Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Driver information

 
Navin Pillu
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic