How can you load the drivers in JDBC?
Submitted by: AdministratorLoading 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:
E.g.
Class.forName(”jdbc.DriverXYZ”);
Submitted by: Administrator
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:
E.g.
Class.forName(”jdbc.DriverXYZ”);
Submitted by: Administrator
Read Online JDBC Job Interview Questions And Answers
Top JDBC Questions
☺ | How can you load the drivers in JDBC? |
☺ | How to Make Updates to Updatable Result Sets in JDBC? |
☺ | How can you retrieve data from the ResultSet using JDBC? |
☺ | How to call a Stored Procedure from JDBC? |
☺ | What are the two major components of JDBC? |
Top Java Programming Language Categories
☺ | Core Java Interview Questions. |
☺ | Hibernate Interview Questions. |
☺ | Advanced Java Interview Questions. |
☺ | IBM WebSphere Interview Questions. |
☺ | Spring Framework Interview Questions. |