Icon View Incident Report

Serious Serious
Reported By: Matthew Reddick
Reported On: 4/20/2005
For: Version 4.19 Build 1
# 2034 ODBC Driver Not Returning the Correct Number of Parameters After Preparing an SQL Statement

I am performing something like the following code using the JDBC->ODBC bridge driver. This seems to work great for the straight jTDS driver through MS SQL. When I try this through DBISam, I get a Null Pointer exception on the setInt() call. I verfied that s is not null. What I did notice is that the number of parameters in the prepared statement after creation of the statement is 0.

PreparedStatement s = dataConnection.getConnection().
prepareStatement("Select * from Groups where GroupsID = ?");

s.setInt(1, 1);

Comments Comments
DBISAM was off by one parameter in the count, so that an actual count of 3 would be reported as 2, 2 would be reported as 1, and so on.

Resolution Resolution
Fixed Problem on 4/22/2005 in version 4.20 build 1

Products Affected Products Affected
DBISAM ODBC Client-Server
DBISAM ODBC Client-Server with Source
DBISAM ODBC Standard with Source