-
How to Retrieve Warnings?
SQLWarning objects are a subclass of SQLException that deal with database access warnings. Warnings do not stop the execution of an application, as exceptions do; they simply alert the user that something did not happen as planned. A warning can be reported on a Connection object, a Statement object (including PreparedStatement and CallableStatement objects), or a ResultSet object. Each of these classes...
-
JDBC-ODBC Bridge does not work with Microsoft J++, because it does not support ___________________
A) Java Native InterfaceExplanation: Any all-Java JDBC driver should work with J++
-
-
What is the precision of java.math.BigDecimal limited _____ digits in the JDK 1.0.2 add-on version of the JDBC API.
A) 18B) 24C) 32D) 64Explanation: because In JDK 1.1, java.math.BigInteger is implemented in C. It supports a precision of thousands of digits. The same is true for BigDecigmal.
-
Which of the following statements is false regarding the error returned by the driver manager return 'Data source name not found and no default driver specified Vendor: 0'.
A) This type of error occurs during an attempt to connect to a database with the bridge.B) The error is coming from the ODBC driver manager.C) The problem is due to the native libraries not present.D) The error is due to the fact that an ODBC DSN (data source name) needs to be configured on the client machineExplanation: the problem is because of the point d mentioned and not due to native DLL’s not...
-
-
-
SQL query using JDBC
When you execute a SQL query using JDBC, do you get a complete recordset or the partial recordset?
-
What are the different types of Statements?
1.Statement (use createStatement method) 2. Prepared Statement (Use prepareStatement method) and 3. Callable Statement (Use prepareCall)
-
-
-
-
-
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...
-
State true or false :-The new features in the JDBC 2.0 API is the ability to move a result set’s cursor backward as well as forward.
A) TrueB) FalseExplanation: There are also methods that let you move the cursor to a particular row and check the position of the cursor
-
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.
-
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 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.
-
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