|
INTERVIEW QUESTIONS
J2EE
JDBC
DETAILS
Question: How can you load the drivers?
Answer: Loading the driver or drivers you want to use is very simple and involves just one line of code.
If, for example, you want to use the JDBC-ODBC Bridge driver, the following code will load it:
Eg.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Your driver documentation will give you the class name to use. For instance, if the class name is jdbc.DriverXYZ , you would load the driver with the following line of code:
Eg.
Class.forName("jdbc.DriverXYZ");
|
|
|
Category |
JDBC Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 8157 users |
Added on |
10/23/2009 |
Views |
77227 |
Rate it! |
|
|
Question:
How can you load the drivers?
Answer:
Loading the driver or drivers you want to use is very simple and involves just one line of code.
If, for example, you want to use the JDBC-ODBC Bridge driver, the following code will load it:
Eg.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Your driver documentation will give you the class name to use. For instance, if the class name is jdbc.DriverXYZ , you would load the driver with the following line of code:
Eg.
Class.forName("jdbc.DriverXYZ"); Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What Class.forName will do while loading drivers?
|
View Answer
|
|
How can you make the connection?
|
View Answer
|
|
How can you create JDBC statements?
|
View Answer
|
|
How can you retrieve data from the ResultSet?
|
View Answer
|
|
What are the different types of Statements?
|
View Answer
|
|
How can you use PreparedStatement?
|
View Answer
|
|
How to call a Stored Procedure from JDBC?
|
View Answer
|
|
How to Retrieve Warnings?
|
View Answer
|
|
How to Make Updates to Updatable Result Sets?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All JDBC Interview Questions & Answers - Exam Mode /
Learning Mode
|