0

I have created a login which connects to an Access Database. It works fine except the password input is case insensitive. I have tested this using passwords such as one ONE and One, all of which result in a successful login. How do I change the SQL query to stop this happening?

Bill435
  • 19
  • 6
  • 4
    This doesn't answer your question, but I'd like to point out that this is not a good way to authenticate. You shouldn't store the password in plain text. – devlin carnate Oct 31 '19 at 21:23
  • Possible duplicate of [username and password verification vb.net](https://stackoverflow.com/questions/47713267/username-and-password-verification-vb-net) (which includes information on how to do passwords properly). – Andrew Morton Nov 01 '19 at 11:05

1 Answers1

2

You must use StrComp(string1, string2, compare) with binary comparison. Returns 0 when strings are equal

SELECT count(*) FROM [tblCustomer] WHERE CustomerID = @CustomerID and StrComp(Password, @Password, 0) = 0

See Doc