Doubts on Connection,Statement and ResulSet Interfaces
Ok I know that to connect to a database we have to use the Connection interface to setup the connection,
use Statement Interface to create SQL statements and
a ResultSet Interface to hold the results from the database.
My question is, where is the method definition for the following
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("SELECT * from BLAH");
I know that their method declarations are there in the source files Connection.java,Statement.java and ResultSet.java.
By there has to be a class somewhere implementing these interfaces and defining the methods,rite?
If so, where is the method definitions?
When u use Connection, Statement and ResultSet in your java code. Then u first import these packages--
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
in your class.
Actually these are the .jar file and define and implement in that package before making .jar file. These are found in JDBC Driver like classes12.zip and ojdbc14.zip.
I had been checking the source files, api docs and almost every where for the implementation.
I'm the kind that cant accept something as it is and have to open up and see where all the wires inside go ;)
Thanks for reply so quickly, I finally can stop looking.
I'll give ya both(georgemc & tobias.winterhalter) a duke star each ;)
Message was edited by:
ArcherKing