Re: OC4J Bind Variables: Positional Notation
Date: Wed, 16 Jul 2008 08:07:56 +0200
> 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?
JaromirReceived on Wed Jul 16 2008 - 01:07:56 CDT