how can I check if my recordset is empty??



I am trying to set a variable 0 or 1 if my recordset1 is not empty
but this returns 1 even when my recordset1 should be empty, can
somebody help please?

<% If isNull(Recordset1) Then
dim valore
valore = 0
valore = 1
end if



Jeff Boyce

The code you posted only Dim's "valore" if the first leg of your If...
statement evaluates true. Consider moving the Dim statement outside of the
If... statement.

One approach is to check to see if your recordset starts out at both the
beginning and end of the file:
If Recordset1.BOF and Recordset1.EOF Then

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question