-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

C.F. Scheidecker Antunes wrote:
> Hello,
> 
> Can anyone tell me what to do in order to use transactions on a java 
> application? Is there any howto regarding this issu?
> 
> Thanks,
> 
> C.F.
> 

C.F.

First, make sure you're using the InnoDB storage engine (which supports
transactions):

http://dev.mysql.com/doc/mysql/en/using-innodb-tables.html

Then use Connection.setAutoCommit(false) before starting your
transaction, and Connection.commit()/Connection.rollback() to commit or
rollback transactions:

http://java.sun.com/docs/books/tutorial/jdbc/basics/transactions.html

        -Mark

- --
Mark Matthews
MySQL AB, Software Development Manager - Connectivity
www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC+OdZtvXNTca6JD8RApjfAJ4q5K0N/Tnn5hpQYzJapO8AoDZEFQCfXsE7
laCWxC37BdRNqC3E6qenBzw=
=Rab0
-----END PGP SIGNATURE-----

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to