File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes JDBC and DataSource 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 "JDBC and DataSource" Watch "JDBC and DataSource" New topic

JDBC and DataSource

Rajeev Asthana
Ranch Hand

Joined: Oct 27, 2003
Posts: 43

Are JDBC programming and accessing data thru DataSource different?

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33130

There are two ways to get a connection. You can use Class.forName() and the driver manager or you can use a datasource. Once you have a connection, all the code is the same. Both ways of doing it are JDBC.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: JDBC and DataSource
It's not a secret anymore!