
I have cases to validate user login (ID and Password) , check to database in sql server 2008..
I have created stored procedure to login , but how can I make the sp return value whether the user ID and password is wrong..
thx
|
Newbie Member
|
|
| 18Apr2012,10:54 | #1 |
|
First Question
![]() I have cases to validate user login (ID and Password) , check to database in sql server 2008.. I have created stored procedure to login , but how can I make the sp return value whether the user ID and password is wrong.. thx
|
|
Go4Expert Member
|
|
| 28May2012,21:09 | #2 |
|
Call the sp from c# and fill it in a DataTable and then count the rows of the datatable
PHP Code:
remember you will have to disallow the use of these characters * ; '' @ etc so that there are no injections...
coderzone
like this
|
|
Ambitious contributor
|
|
| 11Jun2012,02:55 | #3 |
|
instead of select all just select what you need. If you have a monsterous usertable like vbulletin or other software does it is unneeded load to query the entire thing. Store that request data as either an array with two fields or two separate variables. No hard coding these values because you what it to be dynamic.
Code: Csharp
Code: SQL
or with an array. Code: Csharp
Code: SQL
Be sure to make a reference to System.Web and use it or else Request will not work. |