-
Bug
-
Resolution: Fixed
-
P2
-
cts_5.0
-
b98
-
generic
-
generic
JDBC defines a bunch of int constants in java.sql.Types. These ints
are used as arguments to assorted methods like getObject and
registerOutParameter. Oracle defines some additional int constants in
oracle.jdbc.OracleTypes that identify Oracle specific types. The JDBC
4.0 spec defines six new types. Unfortunately the int values chosen
for four of those new types conflict with values defined in
OracleTypes. Since ints are ints, there is no way to distinguish
between them. The driver cannot tell the difference between
s.registerOutParameter(n, Types.NCHAR);
and
s.registerOutParameter(n, OracleTypes.ROWID);
The two have the same int value.
The following redefinitions of the
java.sql.Types constants that avoid any incompatibility with OracleTypes.
public final static int NCHAR = -15; // was -8
public final static int NCLOB = 2011; // was 2007
public final static int NVARCHAR = -9; // ok
public final static int LONGNVARCHAR = -16; // was -10
public final static int ROWID = -8; // was 2008
public final static int SQLXML = 2009; // ok
are used as arguments to assorted methods like getObject and
registerOutParameter. Oracle defines some additional int constants in
oracle.jdbc.OracleTypes that identify Oracle specific types. The JDBC
4.0 spec defines six new types. Unfortunately the int values chosen
for four of those new types conflict with values defined in
OracleTypes. Since ints are ints, there is no way to distinguish
between them. The driver cannot tell the difference between
s.registerOutParameter(n, Types.NCHAR);
and
s.registerOutParameter(n, OracleTypes.ROWID);
The two have the same int value.
The following redefinitions of the
java.sql.Types constants that avoid any incompatibility with OracleTypes.
public final static int NCHAR = -15; // was -8
public final static int NCLOB = 2011; // was 2007
public final static int NVARCHAR = -9; // ok
public final static int LONGNVARCHAR = -16; // was -10
public final static int ROWID = -8; // was 2008
public final static int SQLXML = 2009; // ok
- relates to
-
JDK-6467799 No appropriate CCC request for listed JDK 6.0 b98 changes in java(x).sql package
-
- Closed
-