Re: [OJB-developers] nativeSQL() for preparedStatements using jdbc-odbc
Brought to you by:
thma
From: Thomas M. <tho...@ho...> - 2002-03-03 14:39:55
|
Hi Jakob, I think nativeSQL() can be dropped ! Thomas Jakob Braeuchi wrote: > hi, > > i made some tests with my sample application using ms-access over jdbc-odbc. > when using proxy collections the count-statement fails with the following > exception: > > java.lang.NullPointerException > at > sun.jdbc.odbc.JdbcOdbcPreparedStatement.clearParameter(JdbcOdbcPreparedState > ment.java:1026) > at > sun.jdbc.odbc.JdbcOdbcPreparedStatement.setInt(JdbcOdbcPreparedStatement.jav > a:520) > at > sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(JdbcOdbcPreparedStatement. > java:1133) > at > sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(JdbcOdbcPreparedStatement. > java:1077) > at > sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(JdbcOdbcPreparedStatement. > java:1068) > at JDBCTest.main(JDBCTest.java:34) > > i was digging a little bit deeper and found the reason: > > jdbc-odbc does not like the prepare statement using nativeSQL() in > StatementsForClass::prepareStatement(): > > ... > if (!FORCEJDBC1_0) > { > // result = connection.prepareStatement(connection.nativeSQL(sql), TYPE, > CONCUR); // fails with jdbc-odbc > result = connection.prepareStatement(sql, TYPE, CONCUR); > } > else > { > result = connection.prepareStatement(connection.nativeSQL(sql)); > } > ... > > i successfully ran the tests without nativeSQL(). so why is nativeSQL() used > here ? > > thanks > jakob > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > |