getStatement()

Syntax:

Statement getStatement()
                       throws SQLException

Description:

Retrieves the Statement object that produced this ResultSet object. If the result set was generated some other way, such as by a DatabaseMetaData method, this method may return null.

Returns:

the Statement object that produced this ResultSet object or null if the result set was produced some other way

Throws:

SQLException - if a database access error occurs or this method is called on a closed result set.

Reference:

For more information, reference JDBC documentation for: ResultSet.getStatement()