public ResultSet executeQuery(String sql) throws DatabaseException {
  Statement stmt=null;
  try {
    stmt=connection.createStatement();
    return stmt.executeQuery(sql);
  }
 catch (  SQLException e) {
    throw (new DatabaseException(e));
  }
 finally {
    try {
      if (stmt != null) {
        stmt.close();
      }
    }
 catch (    SQLException e) {
    }
  }
}

public ResultSet executeQuery ( String sql ) throws DatabaseException { Statement stmt = null ; try { stmt = connection . createStatement ( ) ; return stmt . executeQuery ( sql ) ; } catch ( SQLException e ) { throw ( new DatabaseException ( e ) ) ; } finally { try { if ( stmt != null ) { stmt . close ( ) ; } } catch ( SQLException e ) { } } }
execute a sql query and return a resultset .
