will the aboue code compiles and runs or any exception??
thanks in advance
regards, krishna.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35254
7
posted
0
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 .....??
Martin Simons
Ranch Hand
Joined: Mar 02, 2006
Posts: 196
posted
0
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 ]
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.