Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JDBC issues with JVM 1.3.0

2 views
Skip to first unread message

Sean LeBlanc

unread,
Sep 25, 2000, 3:00:00 AM9/25/00
to
For various reasons, we are using JVM 1.3.0.

However, during testing we recently found a bug
which we did not have previously in 1.2.2.

We get this:

java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid character value for cast specification
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
at sun.jdbc.odbc.JdbcOdbc.SQLExecute(JdbcOdbc.java:2533)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(JdbcOdbcPreparedStatement.java:217)


Now, the code we are using looks something like this:

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
dataBaseCon = DriverManager.getConnection("jdbc:odbc:ourdb","user","pwd");

CallableStatement cStatement = dataBaseCon.prepareCall("{call sreport1(?,?,?)}");
cStatement.setInt(1, val1);
cStatement.setInt(2, val2);
cStatement.setInt(3, val3);


cStatement.registerOutParameter(1, Types.INTEGER);
cStatement.registerOutParameter(2, Types.INTEGER);
cStatement.registerOutParameter(3, Types.INTEGER);

cStatement.execute());


The error appears to be happening on the execute().

Environment:
JVM 1.3.0
MS SQL Server 7.0
client machine = Windows 2000 Prossional

Anyone have any ideas for a fix/workaround? As you
can see we are using the JDBC-ODBC bridge. Is this
the problem?


Thanks in advance,
Sean

0 new messages