PDA

View Full Version : JDBC driver problem - Informix XPS


grpatel20
05-04-02, 12:59
I am facing a problem with using Informix JDBC driver 2.2. Database is Informix XPS 8.32.FC1.

I get the following error when I try to close a connection:

"Error Closing Connection. Must terminate transaction before closing database."

I am not starting a transaction. All I am doing is a SELECT. Why am I getting this error ?

Any help will be really appreciated. This is driving me crazy.

Thanks
Ghanshyam

dananio
05-04-02, 16:55
I don't know about use JDBC connect Informix , in SQL statement that you send it to run use "begin work" ...<YOUR SQL> "commit work" ,I don't know that it's the solution but it's identify that begin transaction and end transaction

rnealejr
05-05-02, 07:51
Are you closing your resultset and statements ? Are you setting autocommit ? Have you reviewed the release notes ?

If possible, please post your code.

grpatel20
05-13-02, 14:02
Here is what I am doing:

Connection conn = ds.getConnection();
conn.setAutoCommit(true); // default is true so not really needed
String sql = "select * from emp";
Statement stmt = conn.createStatement(sql);
ResultSet rs = stmt.executeQuery();
// process ResultSet code here
conn.close() // this is where I get the error

Thanks
Ghanshyam