Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes JDBC and Relational Databases and the fly likes Invalid Transaction state Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Invalid Transaction state" Watch "Invalid Transaction state" New topic

Invalid Transaction state

shobha satalkar

Joined: Aug 20, 2005
Posts: 1
I am using Oracle ODBC for my application, while performing some operation it gives be exception : [Microsoft][Oracle ODBC]Invalid Transaction state.

Can any one tell me that is the cause of this exception?

I want that if data is inserted in database the it slould be reflected in all tables, and if any exception occur then no change should be reflected i any table. So, before starting insertion statement I have made connection.setAutoCommit(false);

And, if all process works fine (i.e. no exception occured then I set connection.commit() ).

Can anyone give me a solution?
Annie Smith
Ranch Hand

Joined: Mar 05, 2005
Posts: 172
YOur approach sounds okay. It might have something to do with the way the code has been written. Could you post it to give some idea?

Cheers!<br /><b>Annie</b>
I agree. Here's the link:
subject: Invalid Transaction state
It's not a secret anymore!