• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

data source reference?

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is data source reference a Connection object?
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so what's a data source object?

what's the difference between
DriverManager.getConnnection("jdbc:odbc:dsn",�un�,�pw�);
and
DataSource.getConnection();
 
krishna prasad gunasekaran
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so what's a data source object?

what's the difference between
DriverManager.getConnnection("jdbc:odbc:dsn",�un�,�pw�);
and
DataSource.getConnection();
 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
reply
    Bookmark Topic Watch Topic
  • New Topic