1. A Java program cannot directly communicate with an ODBC driver because .......
ODBC Administrator (Photo credit: Wikipedia) |
A) ODBC written in C language
B) ODBC written in C# language
C) ODBC written in C++ language
D) ODBC written in Basic language
2.The JDBC-ODBC Bridge driver translates the JDBC API to the ODBC API and used with .......
A) JDBC drivers
B) ODBC drivers
C) Both A and B
D) None of the above
3. The ............................. package contains classes that help in connecting to a database, sending SQL statements to the database, and processing the query results.
A) connection.sql
B) db.sql
C) pkg.sql
D) java.sql
4. The ................................ method executes a simple query and returns a single Result Set object.
A) executeUpdate()
B) executeQuery()
C) execute()
D) noexecute()
5. The ......................... method executes an SQL statement that may return multiple results.
A) executeUpdate()
B) executeQuery()
C) execute()
D) noexecute()
6. The ........................ object allows you to execute parametrized queries.
A) ResultSet
B) Parametrized
C) PreparedStatement
D) Condition
7. The .................. object provides you with methods to access data from the table.
A) ResultSet
B) Parametrized
C) TableStatement
D) Condition
8. The parameters of the PreparedStatement object are ...................... when the user clicks on the Query button.
A) initialized
B) started
C) paused
D) stopped
9. The ...................... method sets the query parameters of the PreparedStatement Object.
A) putString()
B) insertString()
C) setString()
D) setToString()
10. Connection object can be initialized using the ............................ method of the Driver Manager class.
A) putConnection()
B) setConnection()
C) Connection()
D) getConnetion()
Answers:
1. A Java program cannot directly communicate with an ODBC driver because .......
A) ODBC written in C language
2.The JDBC-ODBC Bridge driver translates the JDBC API to the ODBC API and used with .......
B) ODBC drivers
3. The ............................. package contains classes that help in connecting to a database, sending SQL statements to the database, and processing the query results.
D) java.sql
4. The ................................ method executes a simple query and returns a single Result Set object.
B) executeQuery()
5. The ......................... method executes an SQL statement that may return multiple results.
C) execute()
6. The ........................ object allows you to execute parametrized queries.
C) PreparedStatement
7. The .................. object provides you with methods to access data from the table.
A) ResultSet
8. The parameters of the PreparedStatement object are ...................... when the user clicks on the Query button.
A) initialized
9. The ...................... method sets the query parameters of the PreparedStatement Object.
C) setString()
10. Connection object can be initialized using the ............................ method of the Driver Manager class.
D) getConnetion()
Related Posts:
- Solved MCQ of Java Set-1
- MCQ of Java with answer set-2
- Solved MCQ of Java for Java Proficiency test set-3
- Solved MCQ of Java set-4
- Java MCQ Questions and Answers set-5
- Java Multiple Choice Questions With Answers set-6
- MCQ of Java With Answer set-7
- Java Multiple Choice Questions With Answers set-8
- Java Objective Questions with Answers set-9
- Java MCQ Interview Questions With Answers set-10
- Solved MCQ of JDBC and JSP set-1
- Solved MCQ of Java Beans set-1
0 التعليقات:
إرسال تعليق