Originally posted by Michael Zalewski:
I bet the following will work for you...
No I don't think so. The Class.forName() (without the 'newInstance' added) is the preferred way to do it.
The 'newInstance' was only required by older versions of
Java where a Class was not loaded until an instance was created.
A static block in the Driver Class should allow it to register itself with the DriverManager, you shoudn't have to do it yourself.
from the
Sun JDBC Tutorial:
You do not need to create an instance of a driver and register it with the DriverManager because calling Class.forName will do that for you automatically. If you were to create your own instance, you would be creating an unnecessary duplicate, but it would do no harm.
Dave