Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
if exists((select NAME from USER_LST where NAME=@USER_NAME) and (select PWD from USER_LST where PWD=@PWD ))
Posted
Comments
phil.o 26-Nov-15 4:24am    
Which error? Why do you think the error message in itself isn't relevant?

Don't do it like that!
Never store passwords in clear text - it is a major security risk. There is some information on how to do it here: Password Storage: How to do it.[^]
 
Share this answer
 
Here is the right syntax and make sure you follow the password protection rules as mentioned by OriginalGriff.

SQL
if exists(select NAME from USER_LST where NAME=@USER_NAME) AND exists(select PWD from USER_LST where PWD=@PWD )
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900