search a field

Results 1 to 2 of 2

Thread: search a field

  1. #1
    Join Date
    Dec 1969

    Default search a field

    Hi, (newbie here)<BR><BR>I have opened a recordset and am sitting at the first record. I would like to see if a certain field in that record contains a keyword (for example the word server). Any ideas on how to do that? Thanks!

  2. #2
    Join Date
    Dec 1969

    Default Just in that one record?

    Or do you just want to find in the database what you are searching for?<BR><BR>you could loop through the fields, and use an instr function.<BR><BR>for i = 0 to rs.fields.count - 1<BR> if instr(rs.fields(i).value,"server") &#062; 0 then <BR> response.write("found!")<BR> end if<BR>next<BR><BR>otherwise you will need to add "like" clauses to your SQL to only select records that match your search criteria.<BR><BR>Would help if you could explain a little btter what you are trying to do.<BR><BR>-- Whol

Posting Permissions

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