Do you know _exactly_ what line is causing the exception to be thrown?  The
simplest way to do this is to put debugging output around each line and then
see what is output before the error.  Each of the below lines could be
causing the ultimate exception, but the reason WHY they would be throwing
that exception is very different for each.  Once you know the line, post it
up here.

Kristian

PS - I'm assuming that you have obtained PreparedStatement1 and
PreparedStatement2 from the associated connection, and not some other
connection object... but it wasn't clear from the code snippet.  Is that
true?

-----Original Message-----
From: Sergio Moreno [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 19, 2001 2:12 PM
To: JRun-Talk
Subject: Transaction Problem


Hi:

Does anybody know what is the mistake here?

i'm using the Connection object to start a transaction using :
[conection_name].commit();
[conection_name].setAutoCommit(false);
try
{
.
PreparedStatement1.executeUpdate();
PreparedStatement2.executeUpdate();
[conection_name].commit();
.
}
catch (SQLException e)
{
[conection_name].rollback();
}

then shows the error "Invalid Cursor State"
by the way the driver is com.ibm.as400.access.AS400JDBCDriver
and i use the datasource model to obtain the connecction
Sergio Moreno V.
AFP PREVISION * BBV

______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to