var rs = dbConn.executeCachedQuery("select ....");
var rsmd;
var colCount;
after hitting this query i am getting 3 result
 while(rs.next()) {
    logger.info('entering...'+(count + 1));
    var columnName,patientID,value,text = '';
    rsmd = rs.getMetaData();
    colCount  = rsmd.getColumnCount();
    for (var i = 1; i <= colCount; i++) {
        columnName = rsmd.getColumnName(i);
        value      = rs.getObject(i);
        //doing some task here
    }
    //end of FOR loop
 }
 //end of while loop
my query returns 3 rows,after looping through 3 rows while checking 'rs.next()' in WHILE condition, it is throwing below error..
while executing this i am getting this error org.mozilla.javascript.Undefined@c91f0d
please help
 
     
     
    