This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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 Head First Android this week in the Android 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
 
Consider Paul's rocket mass heater.
 
subject: How to load the class while Using 4 th Jdbc Driver
 
It's not a secret anymore!