@A Wizard A True Star said:@UncleMidriff said:I don't know about OraDynaset, but with ADODB.Recordset, RecordCount will return -1 if the recordset was opened with certain cursor types. In which case, the function would consider that an invalid recordset. So this code sucks that much more Actually, this function would consider the string "Fancy Pants" a valid recordset. :-) Anyway, the original poster seemed to be indicating that he thought it absurd to test for RecordCount < 0.  I was just pointing out that that's not such a crazy thing to do, at least not with ADO.  Of course, this particular example is full of WTF.