I have recently started jdbc nd now i am confused that what is the real purpose of Class.forname() method??
Also what is the diff. between Class.forname() and DriverManager.registerDriver()??
plz reply soon
iwannalearn
0
Newbie Poster
Recommended Answers
Jump to PostFirst, have you read the API doc for those two methods?
How have you seen them used? Do you have a code sample?
Jump to PostregisterDriver is the "old" form. The driver classes are to do that themselves when loaded (the reason for the Class.forName() call). In fact, in Java 6 and later, if the driver implements the Services interface (which it must do to qualify as a valid Java 6 JDBC driver (JDBC version …
All 7 Replies
NormR1
563
Posting Sage
Team Colleague
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
NormR1
563
Posting Sage
Team Colleague
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
NormR1
563
Posting Sage
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.