code: public Statement getStatement() throws SQLException {
          // The parent of a ResultSet may be a Statement or a MetaData.
          // For ResultSets created by MetaDatas, the getStatement method should return null,
          // unless the result set is closed.
  
          if (state == State.CLOSED || parentWrapper == null)
              throw createClosedException("ResultSet"); 
  
          if (parentWrapper instanceof WSJdbcDatabaseMetaData)
              return null;
  
          return (Statement) parentWrapper;
      }
docs: Returns the Statement that produced this ResultSet object. If the result set was generated some other
  way, such as by a DatabaseMetaData method, this method returns null.
  
  @return
  the Statment that produced the result set or null if the result set was produced some other way
  @throws SQLException if a database access error occurs.