wood burning stoves 2.0*
The moose likes JDBC and the fly likes Problems with older jdbcodbc drivers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problems with older jdbcodbc drivers" Watch "Problems with older jdbcodbc drivers" New topic

Problems with older jdbcodbc drivers

David ODonovan

Joined: Aug 13, 2001
Posts: 2
Can anyone help me out? Suddenly we have to use JDK1.1.8 eventhough the (rather large) project was written in JDK1.3. Now we have so many problems with the length of our ResultSets (at least 10 Exceptions before the test program gives up). We reckon that the older driver(?) is converting ints into smallints or something aswell. Has anyone had similar problems in the past and is there any solution available besides writing the whole project again? Any help would be greatly appreciated. Many thanks in advance
Ian Lockwood

Joined: Aug 01, 2001
Posts: 22
Hi we have had similar problems in the past using DB2. I too am a Java greenhorn but basically SQL (database) types are not the same as Java Types. ie an int is not an int it is a LONG various other problems occur with floats dates etc, you need to look up your data base defenitions of what the types are ie size range for an int etc and map these to Java Types once you know how they match up you just need to assign and or cast the value from the result set to the apropriate variable.
I hope this helps.

When eating an Elephant take one bite at a time.<p>Ian...........
David ODonovan

Joined: Aug 13, 2001
Posts: 2
Thanks Ian, but our biggest problem was the fact that we compiled the program in JDK1.3 and it worked fine but after compiling it in 1.1.8 it doesn't work anymore. We think that the problem is caused by the JDBC-ODBC Bridge from Sun, which has 2 different versions for the 2 different JDKs. We've asked the project manager to invest in a driver so that we don't have to worry about compatibility anymore. Thanks again,
jQuery in Action, 2nd edition
subject: Problems with older jdbcodbc drivers
Similar Threads
Not a PM or TL, yet... Would the new "Head First PMP" book still be useful?
Anyone running WebLogic 9.2 on Debian?
Keeping Project Metadata in Source Control
Airline System
Why is Maven not seeing my latest changes?