• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

mysql autocommit

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does MySQL 3.23 support transactions at all?
 
Natraj Gudla
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic