-
-
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.
-
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
-
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...
-
-
-
-
-
-
-
-
-
-
-
-
What are the steps for connecting to the database using JDBC
Answered by Jey on 2005-05-10 06:01:10: Here are the steps. Using DriverManager: 1. Load the driver class using class.forName(driverclass) and class.forName() loads the driver class and passes the control to DriverManager class 2.DriverManager.getConnection() creates the connection to the databse Using DataSource. DataSource is used instead of DriverManager in Distributed...
JDBC Interview Questions
Ans