File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes DB2 upgrade creates jdbc driver problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "DB2 upgrade creates jdbc driver problem" Watch "DB2 upgrade creates jdbc driver problem" New topic
Author

DB2 upgrade creates jdbc driver problem

Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
We've been using the COM.ibm.db2.jdbc.app.DB2Driver (driver name = IBM DB2 alias). That driver provides both a JDBC 1.2 and a JDBC 2.0-based implementation.

Over the weekend, they upgraded the database to version 8. Some of our java code failed to run and threw OutOfMemoryErrors, so we switched to using the newer driver com.ibm.db2.jcc.DB2Driver (driver name = IBM DB2 Universal Type 2). It provides JDBC 2.0 and most JDBC 3.0 functionality.

The java code now works again. However, we are experiencing weird things with some of our sql... some of the insert statements appear to run correctly (no errors), but there is no data in the tables.

Anyone have any ideas on what could possibly be causing this?
[ November 14, 2007: Message edited by: Marilyn de Queiroz ]

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19656
    
  18

Perhaps the new DB2 installation does not commit automatically. What is the return value of "connection.getAutoCommit()"? My guess it's false; if so you can use "connection.setAutoCommit(true)" to turn it on again.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
 
subject: DB2 upgrade creates jdbc driver problem
 
Similar Threads
ResultSet is getting closed..
DB2 access from browser using JDBC
java.sql.SQLException: No suitable driver
jdbc access to DB2
WSAD db2 driver failure.