Two Laptop Bag*
The moose likes JDBC and the fly likes How JDBC API works? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How JDBC API works?" Watch "How JDBC API works?" New topic
Author

How JDBC API works?

Santosh Jagtap
Greenhorn

Joined: Sep 20, 2004
Posts: 23
Hi,
Can anybody tell me Since all are interfaces in jdbc api.so can we make objects of connection/ResultSet/Statement etc.. ?


Santy
kelly devon
Ranch Hand

Joined: Apr 15, 2004
Posts: 75
why dont u try out the jdbc tutorial first? i promise u that it helps
a lot. it will help u learn how to use wat u asked. remember nothing is learnt when it is handed to u in a platter. www.sun.com/developer/onlinetraining/database/JDBC20intro/JDBC20.html


kel
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61187
    
  66

Kelly,

JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

thanks,
bear
Forum Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Caitlin Fourie
Greenhorn

Joined: Oct 03, 2003
Posts: 3
Hi

Link above should read http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html

Just a quick hint to Santy:
Take a look at the classes contained in the driver package you use to connect to your database (for example: com.jdbc.mysql in the mysql_3.0.14.jar for MySQL database). The driver class you specify in Class.forName("com.jdbc.mysql.Driver") will register your specific driver. The DriverManager.getConnection(url) then asks for a Connection from all the registered drivers. If the DriverManager finds a driver which can connect to the url you have specified, the returned Connection will then point to all the implemented classes such as Statement which are specific to your database. Therefore you do not have to handle the implementation yourself. If you can, get hold of the source code for your driver or decompile the driver class files with a tool like JAD (http://kpdus.tripod.com/jad.html). This will give you a good idea of how a database vendor has implemented the standard jdbc interfaces. The mysql driver's source & binary is available at: http://dev.mysql.com/downloads/connector/j/3.0.html

Hope this helps
Santosh Jagtap
Greenhorn

Joined: Sep 20, 2004
Posts: 23
Hi Morag,
Thank you for giving such a good explanation now i got some idea about jdbc api.Thnks Again
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How JDBC API works?