wood burning stoves*
The moose likes JDBC and the fly likes Converting from Access to MySQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Converting from Access to MySQL" Watch "Converting from Access to MySQL" New topic

Converting from Access to MySQL

Jason Kwok
Ranch Hand

Joined: Mar 31, 2005
Posts: 126

I've just converted my database from Access to MySQL because I'm running on Linux now.

My question is, are there any changes needed in the servlet code when making a connection to a MySQL database in comparison to an Access database?

Using Access, I would include this in my servlet to make a connection:

String url = "jdbcdbc:jTunesDB"; //jTunesDB is the database name.
Connection connection = DriverManager.getConnection(url,"","");

and previously in my Windows machine, I would go into ODBC setting in my control panel and set the path where the Access database was stored.

If anyone can help me with this, I would greatly appreciate it.

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 31057

That should still work. Note that with MySQL, you are not tied to the ODBC driver. See this article for details.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
I agree. Here's the link: http://aspose.com/file-tools
subject: Converting from Access to MySQL