Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MS Access Driver for servlets?

 
Agnes Lapka
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm new to servlets and I'm very confused.
I'm trying to write a servlet that will write data to Access Database. I have the Microsoft Access Driver which comes with Windows ( Settings -> Control Panel -> ODBC Data Sources ).
I thought I could use it in my servlet until I've heard that I must include the path to a JAR file containing the Driver in my CLASSPATH settings. Where can I get a JAR file with Access Driver? Can I use the Driver I already have or do I need to download a new one? I would be grateful for suggestions.
TIA - A.
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
just register your database at settings -> control panel -> odbc data as you said and than use the jdbc dbc brige
String url = "jdbc dbc:yourRegisteredDB";
Connection con = DriverManager.getConnection(url, "username", "password");
take a look at: http://java.sun.com/docs/books/tutorial/jdbc/index.html

[This message has been edited by Marcos Maia (edited August 02, 2001).]
 
Agnes Lapka
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Marcos. I'm going to try that right away.
Thanks for your help. A.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic