Use the methods on QueryRunner that accept a
Connection, and set auto commit false on your
connection object.  Then just call conn.rollback() if
one of your statements fail, else call conn.commit()
after all of your statements are executed.

There are some handy methods in the DBUtils class such
as commitAndCloseQuietly(conn), and
rollbackAndCloseQueitly(conn) for this purpose.

--- Christian M�ller <[EMAIL PROTECTED]>
wrote:

> Hi!
> 
> I use DBUtil since 4 month. Now, i will use it with
> DB-Transaction.
> How can use it with more then one statement within
> one transaction.
> E.G. if the second statement fails, the first should
> be rolled back...
> 
> I found one message in the List
>
(http://nagoya.apache.org/eyebrowse/ReadMsg?listId=15&msgNo=37987),
> but I don't understand this... :o(
> 
> Thanks for help,
> Christian
> 
>
---------------------------------------------------------------------
> 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]

Reply via email to