return recs;
}
public static void removeRows(Query query, int index, int count) throws PageException {
if(query.getRecordcount()==0)
throw new DatabaseException("cannot remove rows, query is empty",null,null,null);
if(index<0 || index>=query.getRecordcount())
throw new DatabaseException("invalid index ["+index+"], index must be between 0 and "+(query.getRecordcount()-1),null,null,null);
if(index+count>query.getRecordcount())
throw new DatabaseException("invalid count ["+count+"], count+index ["+(count+index)+"] must less or equal to "+(query.getRecordcount()),null,null,null);
for(int row=count;row>=1;row--){
query.removeRow(index+row);
}
}