| Author |
Where is Implementation for this method
|
vinothk khannan
Greenhorn
Joined: Oct 08, 2003
Posts: 13
|
|
We all know that ResultSet is an Interface.And for example ResultSet rs = st.executeQuery(.....); Now, We give rs.next(); Where is the implementation for next() method. We create reference for ResultSet and call the next() method. Regards, Vinod
|
 |
Mani Ram
Ranch Hand
Joined: Mar 11, 2002
Posts: 1140
|
|
|
The implementation is provided by the JDBC driver.
|
Mani
Quaerendo Invenietis
|
 |
vinothk khannan
Greenhorn
Joined: Oct 08, 2003
Posts: 13
|
|
Need Some More Explanation Or hyper links to explanatory docs
|
 |
Jeroen Wenting
Ranch Hand
Joined: Oct 12, 2000
Posts: 5093
|
|
|
That's all the explanation you should need. Read up on JDBC in your tutorial.
|
42
|
 |
Mani Ram
Ranch Hand
Joined: Mar 11, 2002
Posts: 1140
|
|
Originally posted by vinothk khannan: Need Some More Explanation Or hyper links to explanatory docs
Let me try. If you are using an Oracle driver to connect to Oracle database, the implementation for ResultSet interface is provided by the Oracle driver. For example, if you look into the ojdbc.jar file, you can find a class called OracleResultSet(*) which implements java.sql.ResultSet. So, when you say what you get is is an object of type OracleResultSet, which has the implementation for all the methods defined in the java.sql.ResultSet interface. If you are using someother database, say XYZ, the respective driver also will have a concrete implementation of all necessary interfaces. Hope that helps. (*) I'm not sure about the name of the class. I'm just guessing.
|
 |
 |
|
|
subject: Where is Implementation for this method
|
|
|