return c.doQuery(sql, params, statements);
ResultSet rs = c.doQuery(sql, params, statements);  XSQLVAR[] xsqlvars = new XSQLVAR[7];  xsqlvars[0] = new XSQLVAR(); xsqlvars[0].sqltype = GDS.SQL_VARYING; xsqlvars[0].sqllen = 31; xsqlvars[0].sqlind = -1; xsqlvars[0].sqlname = "TABLE_CAT"; xsqlvars[0].relname = "TABLEPRIV";  xsqlvars[1] = new XSQLVAR(); xsqlvars[1].sqltype = GDS.SQL_VARYING; xsqlvars[1].sqllen = 31; xsqlvars[1].sqlind = -1; xsqlvars[1].sqlname = "TABLE_SCHEM"; xsqlvars[1].relname = "TABLEPRIV";  xsqlvars[2] = new XSQLVAR(); xsqlvars[2].sqltype = GDS.SQL_VARYING; xsqlvars[2].sqllen = 31; xsqlvars[2].sqlind = 0; xsqlvars[2].sqlname = "TABLE_NAME"; xsqlvars[2].relname = "TABLEPRIV";  xsqlvars[3] = new XSQLVAR(); xsqlvars[3].sqltype = GDS.SQL_VARYING; xsqlvars[3].sqllen = 31; xsqlvars[3].sqlind = -1; xsqlvars[3].sqlname = "GRANTOR"; xsqlvars[3].relname = "TABLEPRIV";  xsqlvars[4] = new XSQLVAR(); xsqlvars[4].sqltype = GDS.SQL_VARYING; xsqlvars[4].sqllen = 31; xsqlvars[4].sqlind = 0; xsqlvars[4].sqlname = "GRANTEE"; xsqlvars[4].relname = "TABLEPRIV";  xsqlvars[5] = new XSQLVAR(); xsqlvars[5].sqltype = GDS.SQL_VARYING; xsqlvars[5].sqllen = 31; xsqlvars[5].sqlind = 0; xsqlvars[5].sqlname = "PRIVILEGE"; xsqlvars[5].relname = "TABLEPRIV";  xsqlvars[6] = new XSQLVAR(); xsqlvars[6].sqltype = GDS.SQL_VARYING; xsqlvars[6].sqllen = 31; xsqlvars[6].sqlind = 0; xsqlvars[6].sqlname = "IS_GRANTABLE"; xsqlvars[6].relname = "TABLEPRIV";  ArrayList rows = new ArrayList(); while (rs.next()) { Object[] row = new Object[7]; row[0] = null; row[1] = null; row[2] = rs.getString("TABLE_NAME"); row[3] = rs.getString("GRANTOR"); row[4] = rs.getString("GRANTEE"); String privilege = rs.getString("PRIVILEGE"); if (privilege.equals("A")) row[5] = "ALL"; else if (privilege.equals("S")) row[5] = "SELECT"; else if (privilege.equals("D")) row[5] = "DELETE"; else if (privilege.equals("I")) row[5] = "INSERT"; else if (privilege.equals("U")) row[5] = "UPDATE"; else if (privilege.equals("R")) row[5] = "REFERENCE"; else if (privilege.equals("M")) row[5] = "MEMBEROF"; int isGrantable = rs.getShort("IS_GRANTABLE"); if (isGrantable==0) row[6] = "NO"; else row[6] = "YES";  rows.add(row); }  return new FBResultSet(xsqlvars, rows);
    public ResultSet getTablePrivileges(String catalog, String schemaPattern,                String tableNamePattern) throws SQLException {        checkCatalogAndSchema(catalog, schemaPattern);        Clause tableClause = new Clause("RDB$RELATION_NAME", tableNamePattern);        String sql = GET_TABLE_PRIVILEGES_START;        sql += tableClause.getCondition();        sql += GET_TABLE_PRIVILEGES_END;        ArrayList params = new ArrayList();        if (!tableClause.getCondition().equals("")) {            params.add(tableClause.getValue());        }        return c.doQuery(sql, params, statements);    }