Object[] rows = selectStatement.getRows(); if (rows.length == 0) throw new FBSQLException("No rows could be fetched.");  if (rows.length > 1) throw new FBSQLException("More then one row fetched.");  setRow((byte[][])rows[0]);
try {  gdsHelper.fetch(selectStatement, 10);  Object[] rows = selectStatement.getRows(); if (selectStatement.size() == 0) throw new FBSQLException("No rows could be fetched.");  if (selectStatement.size() > 1) throw new FBSQLException("More then one row fetched.");  setRow((byte[][])rows[0]); } finally { gdsHelper.closeStatement(selectStatement, false); }
    public void refreshRow() throws SQLException {        Object mutex = syncProvider.getSynchronizationObject();        synchronized(mutex) {            try {                                if (selectStatement == null)                    selectStatement = gdsHelper.allocateStatement();                                executeStatement(SELECT_STATEMENT_TYPE, selectStatement);                                Object[] rows = selectStatement.getRows();                if (rows.length == 0)                    throw new FBSQLException("No rows could be fetched.");                                if (rows.length > 1)                throw new FBSQLException("More then one row fetched.");                                setRow((byte[][])rows[0]);                            } catch(GDSException ex) {                throw new FBSQLException(ex);            }        }    }