Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes calling classforname twice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "calling classforname twice" Watch "calling classforname twice" New topic
Author

calling classforname twice

Steven Rodeo
Ranch Hand

Joined: Mar 06, 2008
Posts: 72
what happens when do a classforname("jdbc...driver") twice with two different drivers and then excecute a connection
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42061
    
  64
You can use Class.forName with as many classes as you like, JDBC drivers or others - it has no impact on JDBC functionality.


Ping & DNS - my free Android networking tools app
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

See also this recent discussion:
http://www.coderanch.com/t/487022/JDBC/java/Which-Driver-will-used

JBoss In Action
 
GeeCON Prague 2014
 
subject: calling classforname twice