will the aboue code compiles and runs or any exception??
thanks in advance
Joined: Mar 22, 2005
You can have as many Class.forName statements in a program as you wish, just as you can use several different JDBC drivers in the same program. Mind you, Class.forName is a generic way to load classes, and not exclusively used for JDBC.
but in such case where i have loaded two drivers in the same programme...which one will be pramoted .....??
Joined: Mar 02, 2006
That depends on your connection url. jdbcracle would use the loaded oracle driver. jdbc:mysql would use the loaded mysql driver. If you load two drivers for the same db, then I believe it would use the first one loaded for that connection url type. [ May 29, 2006: Message edited by: Martin Simons ]