File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Loading Drivers! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Loading Drivers!" Watch "Loading Drivers!" New topic

Loading Drivers!

Vanitha Sugumaran
Ranch Hand

Joined: Apr 11, 2001
Posts: 356
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,
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

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 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

[This message has been edited by Jamie Robertson (edited September 24, 2001).]
Vanitha Sugumaran
Ranch Hand

Joined: Apr 11, 2001
Posts: 356
Thanks for your reply Jamie, I will try to use as you suggested.
I agree. Here's the link:
subject: Loading Drivers!
It's not a secret anymore!