passwd validation in SQL

Results 1 to 2 of 2

Thread: passwd validation in SQL

  1. #1
    pari Guest

    Default passwd validation in SQL

    hi i am validating a form where i have a prob in validation of password.<BR>i have set of users and their passwds in the database.<BR><BR>now when i log on , it accepts irrespective of upper case or lower case passwords/login name.<BR>like if user / passwd is pari / pari1x<BR>then it accepts PaRi / pAri1X <BR>or any combination<BR><BR>even if i run the query in query analyser, <BR>select user frm users where pass="pAri1X"<BR>or<BR>select user frm users where pass="pari1x"<BR>it returns the same record<BR><BR><BR>how do i solve this????<BR>please help<BR>Thnx in advance<BR>

  2. #2
    paul.shepheard Guest

    Default RE: passwd validation in SQL

    Your problem is because your database is case insensitive. I would suggest just retreiving the password, and doing to compare in the code, for example:<BR><BR>dim intUser, strSQL, RS01, bPasswordOK<BR><BR>intUser = [Insert User&#039s ID]<BR>strSQL = "SELECT password FROM table WHERE USERID = " & intUser<BR><BR>Set RS01 = Server.Createobject("ADODB.RECORDSET")<BR><BR>RS01 .Open (strSQL, [INSERT CONNECTION OBJECT])<BR><BR>if RS01.EOF then<BR> &#039User ID not found<BR>else<BR> bPasswordOK = (RS01("password") = [INSERT ENTERED PASSWORD])<BR>end if<BR><BR>RS01.Close<BR>Set RS01 = Nothing<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