Transaction sopport?
Posted in 2000
Topics: Installation, Setup & Upgrades, Connectivity: ODBC / JDBC / .NET, Platform-Specific Issues
I have Informix Dynamic Server 7.3 on HP-UX 10.20 used Informix JDBC drive (I forgot what version). Any way when I do try { connection.setAutoCommit(false); // do SQL insert here connection.commit(); } catch (SQLException e) { System.err.println(e); } Where I caught the SQLException say "transaction doesn't support". But If I take out the setAutoCommit and commit, I can insert a row to my table. Is this means Informix Dynamic Server 7.3 doesn't support transaction or my JDBC drive doesn't support transaction? Or both? What version I need to do upgrade for the database server and/or JDBC drive? Thank you in advance!
>Subject: Transaction sopport? >From: Freelancer rhchui@yahoo.com >Date: 02.05.00 14:25 W. Europe Daylight Time >Message-id: <390EC956.B03BCA19@yahoo.com> > >I have Informix Dynamic Server 7.3 on HP-UX 10.20 used Informix >JDBC drive (I forgot what version). Any way when I do > >try { > connection.setAutoCommit(false); > // do SQL insert here > connection.commit(); >} catch (SQLException e) { > System.err.println(e); >} > >Where I caught the SQLException say "transaction doesn't support". But >If I >take out the setAutoCommit and commit, I can insert a row to my table. >Is this means Informix Dynamic Server 7.3 doesn't support transaction or > >my JDBC drive doesn't support transaction? Or both? What version I need >to >do upgrade for the database server and/or JDBC drive? >Thank you in advance! > > > if you use all the defaults, you do not have to do any of those unnatural acts. That is, the default is AutoCommit. The default is .setAutoCommit(true) and the default is you do not need to be doing con.commit(). if you insist in doing all of those things, do not put your insert statement into a prepared statement. If you do, you can only use the statement once. Nona
Watawinona wrote:
>
>
> if you use all the defaults, you do not have to do any of those unnatural acts.
> That is, the default is AutoCommit. The default is .setAutoCommit(true) and
> the default is you do not need to be doing con.commit().
I knew that.
>
>
> if you insist in doing all of those things, do not put your insert statement
> into a prepared statement. If you do, you can only use the statement once.
>
Doesn't matter used prepared statement or not. I still get "transaction not
support" message. I want to con.commit(false), which in case I catch
some SQLException, I can do rollback, if no SQLException then I
con.commit().
So I got help from someone, I need to login as Informix DBA in Informix
server, issued a command (or ask your DBA do for you):
ontape -s -U database_name
This set the database to unbuffered logging
>