Search in Database...found nothing

Results 1 to 2 of 2

Thread: Search in Database...found nothing

  1. #1
    Join Date
    Dec 1969

    Default Search in Database...found nothing

    the user enter&#039s a number, i look in my database and give him the information corresponding to that number...what would be the VBscript code, in case the number isn&#039t in my database, how can i tell the user?

  2. #2
    Join Date
    Dec 1969

    Default RE: Search in Database...found nothing

    After you open your recordset check to see if the EOF property is TRUE. If it is true, you have no records in the recordset and you can code a response informing the user their search didn&#039t find any records. If EOF is FALSE, you&#039ve got at least one record in your recordset.<BR><BR>rs.Open "Select *...", sConnection, adOpenStatic, adLockOptimistic<BR><BR>if rs.EOF Then<BR>---what to do if no records were found<BR>else<BR>---do the appropriate processing<BR>end if<BR>

Posting Permissions

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