Which type of Statement can execute parameterized queries?
Shamsa hafeez from Lahore, Pakistan is saying PreparedStatement is correct answer
Belandje Indonesia is saying ParameterizedStatement is correct answer
Sailaja from Surat, India is saying PreparedStatement is correct answer
Francis Fabul is saying ParameterizedStatement and CallableStatement is correct answer
Sagar Gawari from Pune, India is saying PreparedStatement 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
Which of the following statements is false as far as different type of statements is concern in JDBC?
- [A] Regular Statement
- [B] Prepared Statement
- [C] Callable Statement
- [D] Interim Statement
- [A] Type 1 driver
- [B] Type 2 driver
- [C] Type 3 driver
- [D] Type 4 driver
- [A] By invoking the method get(..., String type) on the ResultSet, where type is the database type
- [B] By invoking the method get(..., Type type) on the ResultSet, where Type is an object which represents a database type
- [C] By invoking the method getValue(...), and cast the result to the desired Java type.
- [D] By invoking the special getter methods on the ResultSet: getString(...), getBoolean (...), getClob(...)