5 years ago in JDBC

What happens if you call the method close() on a ResultSet object?

[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
Loading...
Next Question

Overall Stats

Attempted 553
Correct 59
Incorrect 187
Viewed 307

Answers

Guest
Guest
Shamsa hafeez
Shamsa hafeez - 4 days ago

Shamsa hafeez from Lahore, Pakistan is saying 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 is correct answer

Sagar Gawari
Sagar Gawari - 4 weeks ago

Sagar Gawari from Pune, India is saying the method close() does not exist for a ResultSet. Only Connections can be closed. is correct answer

Zo Go
Zo Go - 1 month ago

Zo Go from Casablanca, Morocco is saying the method close() does not exist for a ResultSet. Only Connections can be closed. is correct answer

Reshma sunil Reshma
Reshma sunil Reshma - 1 month ago

Reshma sunil Reshma from Ahmedabad, India is saying 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 is correct answer

Aashi Garg
Aashi Garg - 2 months ago

Aashi Garg from Greater Noida, India is saying the method close() does not exist for a ResultSet. Only Connections can be closed. is correct answer

Related Questions

Which packages contain the JDBC classes?

  • [A] java.jdbc and javax.jdbc
  • [B] java.jdbc and java.jdbc.sql
  • [C] java.sql and javax.sql
  • [D] java.rdb and javax.rdb

What happens if you call deleteRow() on a ResultSet object?

  • [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

How can you execute a stored procedure in the database?

  • [A] Call method execute() on a CallableStatement object
  • [B] Call method executeProcedure() on a Statement object
  • [C] Call method execute() on a StoredProcedure object
  • [D] Call method run() on a ProcedureCommand object

How many JDBC driver types does Sun define?

  • [A] one
  • [B] two
  • [C] three
  • [D] four