DEVFYI - Developer Resource - FYI

Can I get information about a ResultSet's associated Statement and Connection in a method without having or adding specific arguments for the Statement and Connection?

JDBC Interview Questions and Answers


(Continued from previous question...)

Can I get information about a ResultSet's associated Statement and Connection in a method without having or adding specific arguments for the Statement and Connection?

Yes. Use ResultSet.getStatement(). From the resulting Statement you can use Statement.getConnection().

(Continued on next question...)

Other Interview Questions