Simple Database Question

Results 1 to 2 of 2

Thread: Simple Database Question

  1. #1
    65535 Guest

    Default Simple Database Question

    I have a ASP page that pulls records from a Access database, and I use a SQL statement that searches the records of the access database... But I will sometimes search by model number and not find any records, and I get an error:<BR><BR>ADODB.Recordset (0x800A0BCD)<BR>Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.<BR><BR>I use a Do while Not objRS.EOF .... Loop statement, So what do I need to add that will display "No Records Found", when it doesn&#039;t find any records, then if it does find records, it displays them...<BR><BR><BR>Thanks in advance, sorry for this basic question :""2nawebmaster

  2. #2
    Join Date
    Dec 1969

    Default RE: Simple Database Question

    Check for EOF first....<BR><BR><BR>IF objRS.EOF Then<BR>&#039;No records found.<BR><BR>Else<BR><BR>Do while Not objRS.EOF<BR>&#039;There are records, loop through them...<BR><BR>objRS.MoveNext<BR>loop<BR><BR>END IF

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts