Michel, I'm glad that helped. Good luck with Torque! It's a great product.
Tom -----Original Message----- From: Michel Beijlevelt [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 3:34 AM To: Apache Torque Users List Subject: RE: How to creat a Transaction to add or delete muti-Table Data? Hello Tom, sorry for my late reply, been away for a while. Hah! I forgot the rollback in the exception-catch, no wonder it didn't do a rollback! :-) Thanks. gr. Michel > Michel, > > This is just a guess, but did you catch the Exception when the transaction > fails and call Transaction.rollback() (or Transaction.safeRollback())? > Your > code might look like this: > > Connection conn = null; > > try { > conn = Transaction.begin( FactextraoptionsPeer.DATABASE_NAME > ); > extraoptions.save(conn); > contract.save(conn); > Transaction.commit(conn); > } catch (Exception e) { > Transaction.safeRollback(conn); > throw e; > } > > Perhaps it will work this way. I'm suprised that it hasn't worked for you > since I've been using transactions in Torque successfully for quite > sometime. What database are you using? > > Tom --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
