Forums Register Login

Implementation of Interfaces

+Pie Number of slices to send: Send
Hi All,
Thanks a lot in advance.
In java.sql package, we will have almost all are interface like Connection, Statment, ResultSet.
In normal JDBC program we will use directly those interfaces and methods, But where we have the actual implementation?
I have seen rt.jar also, which is contaning just interface, but where is implemented one.

Regards
Sree
+Pie Number of slices to send: Send
The implementation of those interfaces you can find in the driver jar of the respective database.
+Pie Number of slices to send: Send
If at all you don't find the actual source files, try getting the source files ('src' - general term everyone follow) from the respective database driver vendors.
+Pie Number of slices to send: Send
Thanks a lot for your reply.
However, without setting any classes12.jar or any other jar file a normal JDBC code which uses JdbcOdbcSriver will works fine?
And I tried by extracting the classes12.jar file clasess, there I could not find any implementation, please tell me the exact name of the class which is implemented.
+Pie Number of slices to send: Send
oracle.jdbc.driver.OracleDriver should be the one implementing Driver interface.
+Pie Number of slices to send: Send
 

However, without setting any classes12.jar or any other jar file a normal JDBC code which uses JdbcOdbcDriver will works fine?

Yes. It will work.

Prefer to use the vendors driver if it's available.


Regards, Jan
+Pie Number of slices to send: Send
Sun don't recommend you use the JDBC-ODBC bridge for much:


The JDBC-ODBC Bridge driver is recommended for use in prototyping efforts and for cases where no other JDBC technology-based driver exists. If a commercial, all-Java JDBC driver is available, we recommend that it be used instead of the Bridge.


(from Sun's JDBC docs)
+Pie Number of slices to send: Send
Thanks a lot for replies,
However, Where I can find that Implemented class if it allows with normal JdbcOdbcDriver.
I have seen by extracting ojdbc14.jar file.

Regards,
Sreedhar
What do you have to say for yourself? Hmmm? Anything? And you call yourself a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1094 times.
Similar Threads
can we creat an instance of an interface?
confused with interface....
Design Pattern
confusion in k&b page 118
Problem in understanding -how interface helpful
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 14:22:07.