twen said:
Has anyone encountered an error where the RecordCount property comes
in as -1, regardless of whether there are records in the RecordSet
or not? If so, how do you fix it?
The -1 means that it can't determine the actual number of records.
If you're only after testing whether there are records or not, use
if ((not rs.bof) and (not rs.eof)) then
' ah - there are records...
end if
If you really, really need a recordcount, do a select count(*) ... with
the same where clause.
You're supposed to be able to get the correct recordcount with with
some
properties, lets see if I recall, client side cursor, static or keyset
-
but I'm not sure I'd rely upon it.