db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keeney, Thomas" <Keen...@SEC.GOV>
Subject RE: How to creat a Transaction to add or delete muti-Table Data?
Date Fri, 08 Aug 2003 13:32:57 GMT
Michel,

I'm glad that helped.  Good luck with Torque!  It's a great product.

Tom

-----Original Message-----
From: Michel Beijlevelt [mailto:mbe@lucka.nl]
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: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message