-
-
-
How can you make the connection?
In establishing a connection is to have the appropriate driver connect to the DBMS. The following line of code illustrates the general idea:E.g.String url = "jdbc:odbc:Fred";Connection con = DriverManager.getConnection(url, "Fernanda", "J8");
-
-
-
Which of the statement below does not correctly defines the difference between JDBC and ODBC ?
A) ODBC can be directly used with Java because it uses a C interfaceB) ODBC makes uses of pointers which has been totally removed from JAVAC) ODBC is from Microsoft while JDBC is from java applicationsD) ODBC requires manual installation of the ODBC driver manager and driver on all client machines. While for JDBC driver are written in Java and JDBC code is automatically installable, secure and portable...
-
Which of the following is false regarding the Type 3 JDBC driver
A) A Type 3 driver is a JDBC-Net pure Java driverB) This translates JDBC calls into a database -dependent net protocol.C) Vendors of database middleware products can implement this type of driver into their products to provide interoperability with the greatest number of database servers.D) a,b aboveExplanation: The JDBC calls are translated into a database-independent net protocol.
-
-
-
-
-
Which of the statements is true regarding loading a driver in JDBC.1. registerDriver(Driver driver).2. Class.forName(java.lang.String driverclass)
A) 1B) 2C) 1, 2D) Neither of the above
-
-
What is JDBC Driver interface?
The JDBC Driver interface provides vendor-specific implementations of the abstract classes provided by the JDBC API. Each vendors driver must provide implementations of the java.sql.Connection,Statement,PreparedStatement, CallableStatement, ResultSet and Driver.
-
What are the common tasks of JDBC?
Create an instance of a JDBC driver or load JDBC drivers through jdbc.driversRegister a driverSpecify a databaseOpen a database connectionSubmit a queryReceive results
-
Which of the statements are true regarding availability of the integrated version of JDBC API and the JDBC-ODBC Bridge in JDK.
A) The JDK 1.1 and the Java 2 SDK, Standard Edition (formerly known as the JDK 1.2), contain both the JDBC API and the JDBC-ODBC Bridge.B) The Java 2 SDK, Standard Edition, contains the JDBC 2.0 core API, does not include the JDBC 2.0 Optional Package, which is part of the Java 2 SDK, Enterprise Edition, or which you can download separately.C) The JDK 1.1 and the Java 2 SDK, Standard Edition (formerly...
-
Which isolation level prevents dirty read in JDBC, connection class.
A) TRANSACTION_READ_UNCOMMITTEDB) TRANSACTION_READ_ COMMITTEDC) TRANSACTION_SERIALIZABLED) TRANSACTION_REPEATABLE_READ.Explanation: A Dirty read allows a row changed by one transaction to be read by another transaction before any change in the row has been committed.
-
-
Which of the following statement is false regarding call to stored procedure from JDBC.
A) Create a CallableStatement object.B) A CallableStatement object contains a call to a stored procedure.C) The execution call should be like CallableStatement cs = con.prepareCall("{call SHOW_SUPPLIERS}");D) We need not make an instance of the Connection class before making a Callable statement.Explanation: The callable statement is prepared based on the connection object only check option c, where...
-
Two parts of JDBC 2.0 API are The JDBC 2.0 core API (the java.sql package), which is included in the JavaTM 2 SDK, Standard Edition The JDBC 2.0 Optional Package API (the javax.sql package), which is available separately or as part of the Java 2 SDK, Enterprise Edition State true or false for the above both points
A) TrueB) FalseExplanation: The JDBC 2.0 API is the latest update of the JDBC API. It contains many new features, including scrollable result sets and the new SQL:1999 (formerly SQL 3) data types.
JDBC Interview Questions
Ans