From: petersontong@techie.com
Newsgroups: comp.databases.oracle.misc
Subject: Problem with JDBC and dblink
Date: Fri, 02 Feb 2001 07:43:23 GMT
Organization: Deja.com
Lines: 16
Message-ID: <95doer$brp$1@nnrp1.deja.com>
NNTP-Posting-Host: 210.177.99.85
X-Article-Creation-Date: Fri Feb 02 07:43:23 2001 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)
X-Http-Proxy: 1.1 x53.deja.com:80 (Squid/1.1.22) for client 210.177.99.85
X-MyDeja-Info: XMYDJUIDpetersontong


I have two oracle databases connected with dblink such that I can
update tables in the remote database with:
insert into table2@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@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/

