db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Van Couvering" <da...@vancouvering.com>
Subject Re: Transaction control in Derby
Date Tue, 31 Jul 2007 17:17:29 GMT
You can use the JDBC apis.  You can use connection.setAutoCommit() to
enable or disable autocommit.  If autocommit is on, then every time
you execute a statement it is executed.  If autocommit is off, then a
transaction is started automatically when you executed the first
statement, and you need to use connection.commit() or
connection.rollback() to commit or roll back a transaction.  Note
there is also support for savepoints.

This is the portable way to do transaction control using JDBC.

David

On 7/31/07, John C. Turnbull <ozemale@ozemail.com.au> wrote:
>
>
>
>
> I am new to Derby and I'm wondering how does one do transaction management?
> I have looked through the reference manual and there doesn't appear to be
> any BEGIN TRANSACTION or ROLLBACK statements mentioned there.  How do I
> execute a series of statements as a proper transaction with the ability to
> rollback the entire thing if need be?
>
>
>
> Thanks,
>
>
>
> John C. Turnbull
>
>

Mime
View raw message