Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to connect to MS ACCESS through our own Driver

 
Gaurav Chhabras
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have one driver named abc, this is a class file means abc.class.
Now i want to manipulate MS ACCESS through this.

How can i do that, what steps should i follow and where to put this class file, and what should i write while writting :

Connection con = DriverManager.getConnection("jdbc:apache:commons: abc SN")

what should i give at the place of DSN or what should i do.

Thanks
Regards
Gaurav
 
Aris Doxakis
Ranch Hand
Posts: 136
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
i think this will work for you

Connection con = null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc dbc:abc");
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!