Originally posted by chellam selvi:
When we are using jdbc program we are using Class.forName("sun.jdbc.odbc.JDbcOdbcDriver");
What is the meaning of the statement?
Then we are using Connection,ResultSet,Statement interfaces,where they have been implemented?
That loads the specified class into the JVM; that class (and all other JDBC-conformant drivers) in turn has a static initialization block that will register the driver with the DriverManager, thereyby making it available for use.
That driver is generally not a "production-capable" driver; database vendors have their own versions of a JDBC driver, some of which have ODBC capability. However, there are a few cases where sun.jdbc.odbc.JDbcOdbcDriver is the only free driver available for that type of data store; there are usually better but non-free drivers in those situations. Also however, in general,
you should avoid using JDBC-ODBC bridges if you can, although there are times that you cannot.