This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Driver information 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 "Driver information" Watch "Driver information" New topic

Driver information

Navin Pillu
Ranch Hand

Joined: Apr 19, 2005
Posts: 103
Hi All

Can anybody explain How to use all types of jdbc drivers. i'm using jdbc-odbc bridge ( Type-1 ). But for learning purpose i want information about all drivers. eg we are using type-1 as

Connection con=DriverManager.getConnection("jdbc dbc:treiber","sa","sa");

So can anybody tell me how to code to get connection from remaining 3 types of drivers.i mean from Native API partly java driver, JDBC-Net pure Java driver,Native protocol pure Java driver.

Thanks in Advance
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

The code is pretty much identical. If you are using the DriverManager its all about the JDBC url - the DriverManager looks for a loaded driver which accepts a connection with the specified URL syntax. SO, if you want to find out about the other driver types I'd down load drivers for whichever database you are using and read the accompanying docs for each, since they always include an example URL.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: Driver information
jQuery in Action, 3rd edition