aspose file tools*
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
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problems with older jdbcodbc drivers" Watch "Problems with older jdbcodbc drivers" New topic
Author

Problems with older jdbcodbc drivers

David ODonovan
Greenhorn

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
Dave
Ian Lockwood
Greenhorn

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.
Ian


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

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,
Dave
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Problems with older jdbcodbc drivers