• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Loading Drivers!

 
Vanitha Sugumaran
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am following sun's tutorial to getting started with jdbc. Here I am, totally lost.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); -- this line works.

Class.forName("jdbc.DriverXYZ"); what should we use instead of DriverXYZ.
Then how can I know that driver is installed in my pc?
I have installed Oracle8 and also I have MS access.
Thanks a lot for your help,
Vanitha.
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
each driver has their specific ways to connect to their database. Although the methods to connect are the same, the parameter values are different.
example: using MSAccess and the jdbc dbc driver that is included in the jdk 1.3.x (after you have registered the database mdb as an ODBC datasource):

With oracle, you can download their own drivers(I recommend the THIN drivers) at http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html and follow the setup procedures(setting classpath) then you can connect to it like:

Connecting to Oracle using the ODBC:JDBC bridge is the same procedure as with the access database(assuming that the right drivers are already on your system).
The text in bold is where you insert your own values
Jamie

[This message has been edited by Jamie Robertson (edited September 24, 2001).]
 
Vanitha Sugumaran
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Jamie, I will try to use as you suggested.
Vanitha.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic