Finding records

Results 1 to 3 of 3

Thread: Finding records

  1. #1
    Join Date
    Dec 1969

    Default Finding records

    I have accessed my database using sql, that works fine. The SQL statement gets all records with the same username, the IF statement then gets the record with the same password as the textbox on the form, all that was working fine until I added another IF statement which gets the staff value from the existing record (e.g. the one that matches the password) I seem to get stuck in aloop which causes Explorer to crash (oops!!!), any ideas? Thanks<BR><BR>If rs.EOF then <BR> &#039;Response.Redirect "" <BR>Response.write "UserName Not Found" <BR>else <BR> While Not rs.EOF <BR> If Ucase(rs("password")) = Ucase(strpass) Then <BR> <BR>********************************Problem Area******* <BR>If (rs("staff")) = true Then <BR> <BR>Response.Redirect "" <BR> Else <BR> Response.write "Not Staff" <BR> End If <BR>********************************************** ***** <BR> Else <BR> rs.Movenext <BR> End If <BR>Wend <BR>Response.write "Password Not Found" <BR>end if

  2. #2
    Join Date
    Dec 1969

    Default What about...

    If rs.EOF then <BR>&#039;Response.Redirect "" <BR>Response.write "UserName Not Found" <BR>else <BR>While Not rs.EOF <BR>If Ucase(rs("password")) = Ucase(strpass) and rs("staff") = True Then <BR><BR>Response.Redirect "" <BR>Else <BR>Response.write "Not Staff" <BR>End If <BR>Else <BR>rs.Movenext <BR>Wend <BR>Response.write "Password Not Found" <BR>end if

  3. #3
    Join Date
    Dec 1969

    Default RE: Finding records

    exit loop?

Posting Permissions

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