Sorry, my previous post is wrong...
I say that mySQL JDBC doesn't support autocommit! It's wrong it
doesnt't support NOT autocommit; you have to use setAutocommit(true);
Connection cnn = null;
try {
Class.forName("org.gjt.mm.mysql.Driver");
cnn =
DriverManager.getConnection("jdbc:mysql://<server>/<database>", <user>,
<password>);
cnn.setAutoCommit(true);
}
catch (SQLException ex) {
}
> Hi,
> I use this code to connect to a mySQL 3.23.36:
> Connection cnn = null;
> try {
> Class.forName("org.gjt.mm.mysql.Driver");
> cnn =
> DriverManager.getConnection("jdbc:mysql://<server>/<database>", <user>,
><password>);
> cnn.setAutoCommit(false); // doesn't support autocommit!
> }
> catch (SQLException ex) {
> }
>> Hello all,
>> I wonder if someone could send me a java code showing how to access a mysql
>> databse. I will appreciate very much, actually my job is counting on that.
>> Thanks in advance
>> Siomara
>> _________________________________________________________________________
>> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>> ---------------------------------------------------------------------
>> Before posting, please check:
>> http://www.mysql.com/manual.php (the manual)
>> http://lists.mysql.com/ (the list archive)
>> To request this thread, e-mail <[EMAIL PROTECTED]>
>> To unsubscribe, e-mail
><[EMAIL PROTECTED]>
>> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
><[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php