aspose file tools*
The moose likes JDBC and the fly likes data source reference? 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 » Databases » JDBC
Bookmark "data source reference?" Watch "data source reference?" New topic
Author

data source reference?

krishna prasad gunasekaran
Ranch Hand

Joined: Jul 25, 2006
Posts: 158
is data source reference a Connection object?


have a great day,
krishna prasad
Wei Dai
Ranch Hand

Joined: Jun 22, 2005
Posts: 86
No. It stores connection information, and DataSource.getConnection() can be used to establish a connection with the data source that this DataSource object represents.
krishna prasad gunasekaran
Ranch Hand

Joined: Jul 25, 2006
Posts: 158
so what's a data source object?

what's the difference between
DriverManager.getConnnection("jdbcdbc:dsn",�un�,�pw�);
and
DataSource.getConnection();
krishna prasad gunasekaran
Ranch Hand

Joined: Jul 25, 2006
Posts: 158
so what's a data source object?

what's the difference between
DriverManager.getConnnection("jdbcdbc:dsn",�un�,�pw�);
and
DataSource.getConnection();
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

DriverManager is used to register and load drivers and then establish connection and the DataSource interface for establishing connections. Just the Way a DriverManager returns a Connection object.

DataSource returns a Connection object when a method getConnection() is called. While the DriverManger loads driver classes(actually the drivers register with the DriverManager when they are loaded).
[ August 31, 2006: Message edited by: Saif Uddin ]

Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: data source reference?