aspose file tools
The moose likes JDBC and Relational Databases and the fly likes Two ways to get Connection object. 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 "Two ways to get Connection object." Watch "Two ways to get Connection object." New topic
Author

Two ways to get Connection object.

Vishal Saxena
Greenhorn

Joined: Apr 23, 2003
Posts: 26
#1. DriverManager.getConnection(String url);
#2. Driver driver = DriverManager.getDriver(url);
driver.connect(url);
I want to know, the difference between them, which one to use under what requirement ?


Thx -V
indian greenhorn
Greenhorn

Joined: May 01, 2003
Posts: 16
Originally posted by Vishal Saxena:
#1. DriverManager.getConnection(String url);
#2. Driver driver = DriverManager.getDriver(url);
driver.connect(url);
I want to know, the difference between them, which one to use under what requirement ?


Hi Vishal,
Just go through the java documention and API for SQL it will give u a clear picture and difference of the statements u have given.
regards,
Krishna
Vishal Saxena
Greenhorn

Joined: Apr 23, 2003
Posts: 26
hey krishna,
Can you elaborate ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Two ways to get Connection object.