Click to See Complete Forum and Search --> : asp error message


raineel
09-07-2006, 01:12 AM
hello all,

I enter a number which does not exists in the database hence
I am getting the below message because i know my recordset is empty.

ADODB.Field (0x80020009)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

is there a way i get a message box saying ur number does not exist instead of the above error.

any help is appreciated.

thank you

raineel

Ubik
09-07-2006, 09:33 AM
check for BOF or EOF prior to manipulating the recordset:


if not rs.BOF and not rs.EOF then
'manipulate recordset
else
response.write "<p>Bummer, dude, no records found.</p>"
end if