informix JDBC not working in 2.1.7
Brought to you by:
mkobold
the Informix JDBC Driver 2.21.JC5 (the lastest relise)
does not suport reverse fech order or anything then
forward fetch.(I belive is that)
The application shoud test for that before it uses it
because now it gets an exception. In version prior to
2.1.6 the driver works fine
visual query builder works fine
log after any select:
[09:45:27] Connection to iSQL Service [test] is sucessful.
[09:45:28] 1 Connection Warnings SQL Warnings have been
added.
[09:45:28] 1 Connection Warnings SQL Warnings have been
added.
[09:45:29] Executing Statement (select count(*) from
account).
[09:45:29] SQLException :: (Method not supported :
Statement.execute(String,int), sqlcode=-79700,
sqlstate=IX000)
Logged In: YES
user_id=67341
Well this is wierd i will give you that ... my first suggestion would be to
explictly turn off returning generated keys, this can be done through the
service manager or the JDBC preferences pane.
the SQLException say to me you have requested that the results return
the generated keys and the drivers is also telling me that it supports it.
so i find it odd that the driver says it supports one thing and does
another but really it doesn't suprise me all that much.
here is a snippet of the code where the error you are describing is likely
to be occurring.
my solution may have to be if execute(String, int) fails for whatever
reason i may have to actually recreate the statement object or
something ? The JDBC API is very lean on details as to what Generated
Keys are for and how they are to handled.
boolean returnKeys = false;
if (sqlStatement instanceof PreparedStatement) {
PreparedStatement ps = (PreparedStatement)
sqlStatement;
results = ps.execute();
} else {
if (wantsGeneratedKeys) { // base on service
preference
try {
if
(cnxMetaData.supportsGetGeneratedKeys()) {
results = sqlStatement.execute(query,
Statement.RETURN_GENERATED_KEYS);
returnKeys = true;
} else {
String msg =
BasicUtilities.getString(resourceBundle,
"Query_With_Keys_Not_Supported");
log(msg);
results = sqlStatement.execute(query,
Statement.NO_GENERATED_KEYS);
}
} catch (Throwable t) {
String msg =
BasicUtilities.getString(resourceBundle, "Query_With_Keys_Failed");
log(msg);
results = sqlStatement.execute(query);
}
} else {
results = sqlStatement.execute(query);
}
}
Logged In: YES
user_id=67341
Update has been posted to CVS tree update will also be available
upon the next release.
Logged In: YES
user_id=990160
maybe its an informix thing...
all tables have same id set to serial (autoincrement) so the
column is generated.
select count(*) ... is calculated maybe thats way its says
it's generated...
at the moment i have no time to look in to this, but as soon
as posible i will.
Logged In: YES
user_id=67341
Update has been posted to CVS tree update it is recommended that you verify
this bug against the current source tree. If you are unable to complie the
application from source please download form the following location
http://isqlviewer.com/isql-core-cvs.jar and replace your iSQL-Viewer.jar or
isql-core file with that jar file.
Update has been posted to CVS tree update it is recommended that you verify
this bug against the current source tree. If you are unable to complie the
application from source please download form the following location
http://isqlviewer.com/isql-core-cvs.jar and replace your iSQL-Viewer.jar or
isql-core file with that jar file.
Logged In: YES
user_id=67341
Update has been posted to CVS tree update it is recommended that you verify
this bug against the current source tree. If you are unable to complie the
application from source please download form the following location
http://isqlviewer.com/isql-core-cvs.jar and replace your iSQL-Viewer.jar or
isql-core file with that jar file.
Update has been posted to CVS tree update it is recommended that you verify
this bug against the current source tree. If you are unable to complie the
application from source please download form the following location
http://isqlviewer.com/isql-core-cvs.jar and replace your iSQL-Viewer.jar or
isql-core file with that jar file.