Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reworking Access to mySQL

 
Ken Kesselman
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, All.

I have a working project - a simulator of Web auction. Currently it pulls all data from a small 4-table Access DB. My question is: is it possible to change the format of the database from Access to mySQL, and what steps should I take to do that?

I'm a very, very lightweight in JDBC\Java.. So any help is GREATELY appreciated.

I'd be glad to provide you the source code of thisproject if you decide to help.

Thank you in advance,

KK
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What aspect are you confused about? Converting the data, or converting the application?

If the latter, unless you used Access-specific SQL statements (and the table structure and names are identical) your app may not need to change at all.
 
Ken Kesselman
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, There!

Thank you for replying.

I guess I'm confused in the way the application will connect to DB. As about the query statements - they are standard: SELECT, INSERT, UPDATE

Here's my DBConnect.java:



My qyuestion is how do I change that so i do not have to set up ODBC connection on the system? Basically, so it uses JDBC driver directly - smth like this:



Am I on the right track here? Can I dierctly modify my code to just change from using ODBC to just JDBC driver?

Thank you again!

Ken
[ May 19, 2005: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that's the right tactic. Your JDBC driver obviously needs to tbe in the classpath, but no other system-specific setup is needed (no control panel crap or stuff like that). The JDBC URL will need to match what is expected by MySQL as well. The MySQL docs should provide that info, or those more familiar with MySQL than myself -- I usually use PostgreSQL -- can chime in.
 
Ken Kesselman
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, Bear!

I changed my code to look like this:



Does this look right? (assuming all the URLs are correct)?

KK
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic