| Author |
Converting from Access to MySQL
|
Jason Kwok
Ranch Hand
Joined: Mar 31, 2005
Posts: 126
|
|
Hi, 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: Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url = "jdbc dbc: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. Thanks, Jason
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26144
|
|
Jason, 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
|
 |
 |
|
|
subject: Converting from Access to MySQL
|
|
|