aspose file tools*
The moose likes Beginning Java and the fly likes How to load the class while Using 4 th Jdbc Driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to load the class while Using 4 th Jdbc Driver" Watch "How to load the class while Using 4 th Jdbc Driver" New topic
Author

How to load the class while Using 4 th Jdbc Driver

sirisha makkapati
Ranch Hand

Joined: Dec 10, 2006
Posts: 83
Any one please tell me What URL We need to specify while loading the 4 th Driver

For First We will Load Like this Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Conncetion con=DriverManager.getConnection("jdbc dbc ataSourcename","UserId","Password");

For 4 th Driver class.forName("URL1");
Conncetion con=DriverManager.getConnection("URL2");


what is URL1,URL2 Here for 4 th Driver

Advanced thanks ..
Ajay Singh
Ranch Hand

Joined: Dec 13, 2006
Posts: 182
it depends on the database. For instance in case of mysql it would be

jdbc:mysql://[server host]/database
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to load the class while Using 4 th Jdbc Driver