Statement closed in transaction
1 posts in topic
Flat View  Flat View

Posted By:   Paco_Alvarez
Posted On:   Friday, December 7, 2001 10:53 AM

Hi, I'm using a transaction to insert data in Oracle.
Between an insert and the next one, I open a new connection for doing a query and then I close it.
And when I try the next insert, occurs the exception java.sql.SQLException: Closed Connection

Can anyone help me?
Thanks in advance.

Re: Statement closed in transaction

Posted By:   Stephen_McConnell  
Posted On:   Friday, December 7, 2001 12:12 PM


Your java.sql.Statement is tied to the Connection. If you check your code, you create the Statement object FROM the connection....

If you close the connection, you close the Statement. That means if you close the connection between inserts, you need to create an new connection and build a new statement.

Stephen McConnell


About | Sitemap | Contact