CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS J2EE JDBC DETAILS
Question :
If 4 different drivers are loaded, & created 4 different statements calling diffener tables from same database, how driver is recognized for each statement?
Category JDBC Interview Questions
Rating (0.0) By 0 users
Added on 7/14/2006
Views 1193
Rate it!
Answers:

1. JDBC connects to DB through Driver

2. When we use a Driver, we need to do 3 things:

a) Load driver class;

b) Create instance of it;

c) Register it into DriverManager.

But in real life, it's very luck that we can realize these in ONE step:

Class.forName("Your.Driver.Class");

3. Then we can use conn=DriverManager.getConnection("DB.URL")

to get "connection" belong to the Driver.

4. Next, Statement = conn.createStatement(SQLofTableX);

SO, diff. driver has diff. conn; diff. conn has diff. statement; diff. SQL for diff. table. Every thing is unique.



As i think only a single driver is needed to load for a single database. If we load more than one driver for a single database it is difficult to distinguish them



 Posted by: vivek singh    

Contact vivek singh  Contact vivek singh


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
What is metadata?
View Answer
Where to use which driver in JAVA?
View Answer
what is savepoint?
View Answer
How differ servlet from its peer Technology?
View Answer
What is the importance in context in jdbc connection pools?

View Answer
how can we connect database in java without using the Class.forname() method with our application?
View Answer
The interface _____________ helps us in retrieving the information about the database.
View Answer
Which of the following allows phantom read in JDBC, connection class?
View Answer
Which of the following allows non repeatable read in JDBC, connection class?
View Answer
Which isolation level prevents dirty read in JDBC, connection class.

View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL JDBC Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/5001/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.66