A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Databases
»
JDBC
Author
After loading many drivers how to use specific?
Umesh Vajpai
Greenhorn
Joined: Mar 14, 2010
Posts: 26
posted
Mar 21, 2010 22:33:24
0
Hi,
consider case-
Class.forname(Driver_1);
Class.forname(Driver_2);
Class.forname(Driver_3);
Connection con = DriverManager.getConnection(...);
Could any one tell me when i will be using con with statement then which connection will be used?
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
I like...
posted
Mar 22, 2010 00:55:05
0
Your driver knows that. The first driver that recognizes your connection
string
will do the job.
OCUP UML fundamental
ITIL foundation
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 5541
I like...
posted
Mar 22, 2010 09:50:49
0
With the number of Ranchers who have asked this same question in the past week I am beginning to suspect that this is a school assignment.
http://www.coderanch.com/t/487913/JDBC/java/calling-classforname-twice
http://www.coderanch.com/t/487022/JDBC/java/Which-Driver-will-used
JBoss In Action
I agree. Here's the link:
http://aspose.com/file-tools
subject: After loading many drivers how to use specific?
Similar Threads
Loading file data into a DB2 table using java
Connection through DSN
Connecting with SQL 2000
Tomcat not loading mysql database driver
How to connect to MS ACCESS through our own Driver
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter