Re: OC4J Bind Variables: Positional Notation

From: jaromir nemec <>
Date: Wed, 16 Jul 2008 08:07:56 +0200
Message-ID: <0d0301c8e70a$4ad39a90$3d02a8c0@ADLA>

Hi Ray,

> Thanks for all the replies.
> The SQL statements are stored in XML files. The XML files have a
> parameter called BindingStyle which is set to either JDBC or Oracle.
> When it is set the JDBC the variables are denoted by a '?'. When it is
> set to Oracle the variables are denoted by ':1' (or :2,:3).
> Changing them does not seem to make any difference.

There is a note in Expert Oracle JDBC Programming p. 156 that "previous versions of JDBC drivers" allowed binding of :1 with setString(1,'xx'). This would explain the incompatible behaviour on upgrade.

The former driver (if this theory is valid - I didn't tested it) tolerated the incompatible setting of your BindingStyle flag, the new driver not. But you would spot problems in the BindingStyle (i.e. statement using :1,:2,.. and BindingStyle = JDBC) on the problematic statement immediately, wouldn't you?



Received on Wed Jul 16 2008 - 01:07:56 CDT

Original text of this message