Which JDBC driver Type(s) can be used in either applet or servlet code?
A. Both Type 1 and Type 2
B. Both Type 1 and Type 3
C. Both Type 3 and Type 4
D. Type 4 only
Answer & Explanation
Answer: Option C
Shamsa hafeez from Lahore, Pakistan is saying Both Type 3 and Type 4 is correct answer
Sailaja from Surat, India is saying Both Type 1 and Type 2 is correct answer
Sagar Gawari from Pune, India is saying Both Type 3 and Type 4 is correct answer
komal badhe from Pune, India is saying Both Type 3 and Type 4 is correct answer
Zo Go from Casablanca, Morocco is saying Both Type 1 and Type 2 is correct answer
- [A] the method close() does not exist for a ResultSet. Only Connections can be closed.
- [B] the database and JDBC resources are released
- [C] you will get a SQLException, because only Statement objects can close ResultSets
- [D] the ResultSet, together with the Statement which created it and the Connection from which the Statement was retrieved, will be closed and release all database and JDBC resources
- [A] The row you are positioned on is deleted from the ResultSet, but not from the database.
- [B] The row you are positioned on is deleted from the ResultSet and from the database
- [C] The result depends on whether the property synchronizeWithDataSource is set to true or false
- [D] You will get a compile error: the method does not exist because you can not delete rows from a ResultSet