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.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL