wood burning stoves 2.0*
The moose likes JDBC and the fly likes How do I know which driver type I am using? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How do I know which driver type I am using?" Watch "How do I know which driver type I am using?" New topic
Author

How do I know which driver type I am using?

Josue Nelson
Greenhorn

Joined: Nov 02, 2012
Posts: 11

I'm using DB2 9.7 and I have the db2jcc.jar driver... How do I know which driver type it is?

Thanks in advance.


JN - SW Specialist
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1761
    
    7

The documentation of the specific RDBMS / driver would be a good place to start.
If the driver is JDBC 4 compatible there's no need to load it via a Class.forName() anymore, though. A JDBC 4 compatible driver should have a file java.sql.Driver file located in the META-INF/services folder of the JDBC driver JAR file, which contains the FQN of the driver class.


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859



gives:



using: db2jcc4-9.5.1.jar

WP

Josue Nelson
Greenhorn

Joined: Nov 02, 2012
Posts: 11

William P O'Sullivan wrote:

gives:



using: db2jcc4-9.5.1.jar

WP



Very helpful information. Thank you very much.

JN.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I know which driver type I am using?