public static boolean nonemptyQueryResult(ResultSet R){
  logger.trace("nonemptyQueryResult(R)");
  boolean nonEmpty=false;
  if (R == null) {
    return false;
  }
  try {
    if (R.getRow() != 0) {
      nonEmpty=true;
    }
 else {
      logger.trace("nonemptyQueryResult(R) - check R.first()...");
      nonEmpty=R.first();
      R.beforeFirst();
    }
  }
 catch (  Throwable t) {
    surfaceThrowable("nonemptyQueryResult()",t);
  }
  return nonEmpty;
}

public static boolean nonemptyQueryResult ( ResultSet R ) { logger . trace ( "nonemptyQueryResult(R)" ) ; boolean nonEmpty = false ; if ( R == null ) { return false ; } try { if ( R . getRow ( ) != 0 ) { nonEmpty = true ; } else { logger . trace ( "nonemptyQueryResult(R) - check R.first()..." ) ; nonEmpty = R . first ( ) ; R . beforeFirst ( ) ; } } catch ( Throwable t ) { surfaceThrowable ( "nonemptyQueryResult()" , t ) ; } return nonEmpty ; }
since the resultset class mysteriously lacks a " size ( ) " method , and since simply iterating thru what might be a large resultset could be a costly exercise , we play the following games . we take care to try and leave r as we found it , cursor - wise .
