|
Hi, I am sathish, I am trying to write a stored procedure to check the login details. Find the query below and help me please..I marked (??) where i have doubt.. Thanks in advance Regards Sathish
(comments are locked)
|
|
If you want to check login credentials against a table in SQL Server, I sugest you do just this: If that stored procedure returns a row, your application will know the provided credentials are correct. If no rows are returned, the login credentials are wrong. If you get no rows returned, you should have your application handle the error messages. I did provide a null-check in the WHERE clause, but your application should make sure no NULL parameters are sent.
(comments are locked)
|
|
Hi, your inner queries in the stored proc should look like this:
(comments are locked)
|
|
I would like to point out a few concerns with what you are wanting to do.
You can still continue with your implementation by placing the select statement to check if the username and password is valid into the ELSE condition:
(comments are locked)
|
|
Hi Magnus,Pavel Pawlowski,WilliamD Thanks for your reply
(comments are locked)
|

