my dog learned polymorphism*
The moose likes JDBC and the fly likes Loading Drivers! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Loading Drivers!" Watch "Loading Drivers!" New topic
Author

Loading Drivers!

Vanitha Sugumaran
Ranch Hand

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

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

Joined: Apr 11, 2001
Posts: 356
Thanks for your reply Jamie, I will try to use as you suggested.
Vanitha.
 
 
subject: Loading Drivers!
 
Similar Threads
connection
connecting MSAccess from unix platform
What is this No Suitable Driver exception?
Network Adapter Problem
Class.forName() problem!!