When I load a JDBC-ODBC bridge driver , why do I need to use the
Class.forName() method. It works the same way even when I make a driver object
using the new() operator.
JdbcOdbcDriver d=new JdbcOdbcDriver();
Is there any difference ?
Re: JDBC-ODBC Bridge
"Seema" <email@example.com> wrote:
>When I load a JDBC-ODBC bridge driver , why do I need to use the
>Class.forName() method. It works the same way even when I make a driver
>using the new() operator.
>JdbcOdbcDriver d=new JdbcOdbcDriver();
>Is there any difference ?
I hope the following is giving you the answer:
To work with the JDBC driver two things are needed with the jdbc driver
-- load and register.
So if you create an instance of the driver, I think you need to register
it explicitely by calling
a) Class.forName() , creates an instance of the driver and calls the registerDriver()
method of that
b) add the driver name in the Jdbc.Drivers System proprty, whenever you
call the first method of the
DriverManager it will load and register all the drivers in that list separeted
Hope it is clear.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center