A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
DriverManager.registerDriver or class.forName
Joined: Apr 16, 2005
Sep 29, 2006 01:27:00
which one is preferable?
class.forName("class");//loads the calss at Runtime
what to do?
A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
Joined: Mar 06, 2001
Sep 29, 2006 01:37:00
From the API:
public static void registerDriver(Driver driver) throws
Registers the given driver with the
. A newly-loaded driver class should call the method registerDriver to make itself known to the
Therefore the DRiver should call registerDriver when it loads (via Class.forName()) therefore you should not call it yourself.
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: DriverManager.registerDriver or class.forName
How to instanciate a class by name?
what this method do in JDBC?
Loading of Classes
Dynamically loading a class
JDBC, mysql connector/j, face a problem to connect mysql 5.1 and JSE.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013