File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes JDBC-Mysql relation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC-Mysql relation" Watch "JDBC-Mysql relation" New topic
Author

JDBC-Mysql relation

Brusk Baran
Ranch Hand

Joined: Nov 15, 2001
Posts: 132
Both seem to be working fine..
<p> <b>Class.forName("org.gjt.mm.mysql.Driver").newInstance();
Class.forName("com.mysql.jdbc.Driver").newInstance();
</b>
</p>
but guess only one should work, which is the older version then?
Regards,
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

I think that the org.gjt.mm.... was for the MMSQL Driver that has now been changed to the Connector/J Driver which uses the com.mysql.jdbc....
You probably have both drivers in your classpath, therfor both are able to resolve???
DO you know what Driver you are using?


GenRocket - A Test Data Generation Platform
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Coma,
The MM distribution has stopped, so the short answer is use the com.mysql.jdbc.Driver driver.
Now, make sure you have the latest stable version of the com.mysql.jdbc.Driver by looking at the MySQL Connector/J page.
By the way, last version to-date is 2.0.14.
Cheers
 
Don't get me started about those stupid light bulbs.
 
subject: JDBC-Mysql relation
 
Similar Threads
retreiving all rows from a mysql table to a jsp page
servlet constructor for initialization
Login Validation In JSP
Problem instantiating an overloaded constructor using Reflections ...
running servlet after the browser is closed