This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JDBC and the fly likes Type of JDBC Drivers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Type of JDBC Drivers" Watch "Type of JDBC Drivers" New topic

Type of JDBC Drivers

Smita Chopra
Ranch Hand

Joined: Jun 27, 2005
Posts: 45
Is there a way to find out the JDBC driver I am using in my application.
By type I mean type1,...., type4 driver.
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Use following method for this:

public String getDriverName()
throws SQLExceptionWhat's the name of this JDBC driver?
JDBC driver name
SQLException - if a database access error occurs

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 39576
... and once you know the driver/class name, you can head over to Suns JDBC driver page to get more information on your particular driver.

Ping & DNS - updated with new look and Ping home screen widget
Smita Chopra
Ranch Hand

Joined: Jun 27, 2005
Posts: 45
Thanks a lot for the information.
I agree. Here's the link:
subject: Type of JDBC Drivers
Similar Threads
Informix JDBC, setQueryTimeout
choose jdbc driver type
Strange SQLException
How to find JDBC driver type ?
JDBC Type $ Driver