Hi, I am unable to switch off the autocommit mode thru my code in java , while connecting to mysql. here, it commits all the queries which i execute immediately.. and the version of mysql which i am using is 3.23.53 , can anyone help me...
So are you trying to use transactions? There are a couple of things you need to do. First, tell us what Driver and what Driver version you are using to access the database. Some drivers don't support some features. I would suggest the latest version of the Connecter/J Driver which is 3.0.8. Second, what type are your tables in mysql? If I remember correctly, InnoDB is the only type that supports Transactions.
ya, sorry that i did not give the details I am using the "org.gjt.mm.mysql.Driver" class as the driver and my application requires to connect to the "mysql" database, create a new database as given by the user and create a new user , grant privileges to the user on the new database, and then exit the application. here i am working on the "user" and the "db" tables of the mysql database , connecting to it using the "root" and with no password. regards
Make sure that you are not using ISAM or MyISAM tables. they do not support transactions. InnoDB and BDB(?) do. If you have the MySQL Control Center installed you can get the info you need from the table properties.