This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes How do I locate a JDBC driver? 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 "How do I locate a JDBC driver?" Watch "How do I locate a JDBC driver?" New topic

How do I locate a JDBC driver?

Chuck Minarik

Joined: Apr 06, 2006
Posts: 4
I wanted to setup a JBDCD-ODBC connection to an Access db. I searched and found out the driver I need is sun.jdbc.odbc.JdbcOdbcDriver...but I had to search a lot longer to find out which jar file this driver is located in...rt.jar...found the info buried in a forum post. Isn't there an easier way?

I've run into this problem several times before, so I'm hoping to find out the best way to resolve this problem in the future.

In general, if I know the driver, how do I find out which jar file it is contained in? TIA.
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703


Or, more generally, ask whoever provides your database. For example, most databases, oracle/db2/mysql/etc ship with a specific JDBC driver that you should use for that version of the software. For example, if you are using Oracle, its better to use a JDBC driver for than one for (making up numbers). Even if they don't ship with it, its good to check the documentation on their website to find what driver they provide.

The ODBC is a special case since its a bridge rather than a direct JDBC driver which is why you can find information for it in rt.jar. Normally, the jar for a driver is completely external and must be downloaded from the db company's website.

My Blog: Down Home Country Coding with Scott Selikoff
jQuery in Action, 2nd edition
subject: How do I locate a JDBC driver?
Similar Threads
JApplet not connecting to SQL database
JDBC Driver spec number?
accessing ojdbc14.jar from a servlet?
Executable jar app doesn't find Driver
NullPointerException, but it should be working