Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes JDBC and DataSource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC and DataSource" Watch "JDBC and DataSource" New topic
Author

JDBC and DataSource

Rajeev Asthana
Ranch Hand

Joined: Oct 27, 2003
Posts: 43
Hi,

Are JDBC programming and accessing data thru DataSource different?

Thanks,
Rajeev.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30353
    
150

Rajeev,
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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC and DataSource