Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Problem with JDBC and dblink
I have two oracle databases connected with dblink such that I can
update tables in the remote database with:
insert into table2_at_db2(co1, col2) values ('123', 'abc')
assumed that local database is db1 and remote database is db2. The
statement is work with sql plus and JDBC Statement, but problem occur
if prepared statement is used:
insert into table2_at_db2(col1, col2) values (?, ?)
if I set first parameter as '123' and secord as 'abc', then col1 will
be inserted 'abc' and col2 will be inserted '123'. The parameters seem
swapped.
Could any one talk what is going wrong.
Sent via Deja.com
http://www.deja.com/
Received on Fri Feb 02 2001 - 01:43:23 CST