File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Driver information Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Driver information" Watch "Driver information" New topic
Author

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

[code]
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
Connection con=DriverManager.getConnection("jdbc dbc:treiber","sa","sa");
[code]

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
Bartender

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: http://aspose.com/file-tools
 
subject: Driver information
 
Similar Threads
JDBC Basics
simple question!!!
MS EXCEL Connect
Driver types
Example drivers for all the 4 types of JDBC Drivers