-
-
How can you load the drivers?
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...
-
-
What are the steps involved in establishing a connection?
This involves two steps: (1) loading the driver and (2) making the connection.
-
Which of the following is not an isolation level in the JDBC.
A) TRANSACTION_READ_UNCOMMITTEDB) TRANSACTION_READ_ COMMITTEDC) TRANSACTION_SERIALIZABLED) TRANSACTION_REPEATABLE_WRITEExplanation: it is TRANSACTION_REPEATABLE_READ and not TRANSACTION_REPEATABLE_WRITE
-
How can you create JDBC statements?
A Statement object is what sends your SQL statement to the DBMS. You simply create a Statement object and then execute it, supplying the appropriate execute method with the SQL statement you want to send. For a SELECT statement, the method to use is executeQuery. For statements that create or modify tables, the method to use is executeUpdate. E.g. It takes an instance of an active connection to create...
-
-
What is a transaction
Answered by anoop shukla on 2005-05-02 10:33:27: transaction is collection of logical operation that perform a task
-
How many JDBC drivers are there ?
A) 2B) 4C) 3D) 1
-
-
-
Which of the following is false for the Type 1 JDBC bridge driver?
A) A Type 1 driver is a JDBC-ODBC bridge driverB) This type of driver enables a client to connect to an ODBC database via Java calls and JDBCC) Both the database and middle tier need to be Java compliant.D) ODBC binary code must be installed on each client machine that uses this driver.Explanation: Neither the database nor the middle tier needs to be java compliant.
-
-
-
-
-
-
Fill in the blanks :- Which method is static synchronized in JDBC API _________
A) getConnection()Explanation: getConnection() method in DriverManager class.Which is used to get object of Connection interface.
-
-
JDBC Interview Questions
Ans