4 messages in com.mysql.lists.javaRe: Help: Urgent
FromSent OnAttachments
Kishor Patil26 Aug 2004 09:21 
Jeff Mathis26 Aug 2004 09:44 
Mark Matthews26 Aug 2004 09:49 
Hollerman Geralyn M26 Aug 2004 09:53 
Subject:Re: Help: Urgent
From:Hollerman Geralyn M (gmh2@louisiana.edu)
Date:08/26/2004 09:53:25 AM
List:com.mysql.lists.java

Jeff Mathis wrote:

Kishor Patil wrote:

Does mysql Connector/J support transaction? I am using mysql-connector-java-3.0.14-production-bin.jar driver. and 5.0-alpha server. But still queries dont rollback. Sample code: con.setAutoCommit(false); String query = "insert into cat_operation values(3,'ex1','N')"; java.sql.Statement statement = con.createStatement(); statement.executeUpdate(query); con.rollback(); //con.commit(); System.out.println("End");

What could be the reason?

Only if you are using InnoDB tables.

(or BerkelyDB tables, but I'm not absolutely sure about these)

BDB tables are transaction safe as well. I have used Connector/J with both BDB and InnoDB tables. I believe MySQL tables are MyISAM by default.