Username and Password

  • Thread starter Thread starter Ahmd
  • Start date Start date
A

Ahmd

Pls some one help me. i have a users table in my database and a login
screen. when login button is clicked after supplying usernme password,
i want to check it from the database and if username and password is
right..then login into admin page.


Pls helpg. very urgent. I user SQL Serverf 2000 db.

thanks
 
Pls some one help me. i have a users table in my database and a login
screen. when login button is clicked after supplying usernme password,
i want to check it from the database and if username and password is
right..then login into admin page.

Pls helpg. very urgent. I user SQL Serverf 2000 db.

How is your ASP.NET app currently querying your SQL Server? Do you use a
DAL?
 
I use SQL Datasource to connect to sql server.

Ah...

Is it not possible to run a stored procedure to which you pass the userid
and password as parameters and which returns you the number of users which
meet those criteria...?

It the answer is 1, then the login was successful...
 
Ah...

Is it not possible to run a stored procedure to which you pass the userid
and password as parameters and which returns you the number of users which
meet those criteria...?

It the answer is 1, then the login was successful...

--http://www.markrae.net

Sorry im new to asp.net, pls can u give me sample code to do this
task. i mean a store procedure to check usernname and a password.
thanks in advance
 
Sorry im new to asp.net, pls can u give me sample code to do this
task. i mean a store procedure to check usernname and a password.
thanks in advance

CREATE PROC CheckLogin
@pstrUserID varchar(20)
@pstrPassword varchar(20)
SELECT COUNT(*) FROM tblUser
WHERE strUserID = @pstrUserID
AND strPassword = @pstrPassword
 
CREATE PROC CheckLogin
@pstrUserID varchar(20)
@pstrPassword varchar(20)
SELECT COUNT(*) FROM tblUser
WHERE strUserID = @pstrUserID
AND strPassword = @pstrPassword

--http://www.markrae.net- Hide quoted text -

- Show quoted text -

Thank you very much for this. if you dont mind.. pls tell me, how to
pass the parameter to the stored procedure as i have never used stored
procedure before and also how to check what it retrived( i mean 1 or
0)

thanks in advance..
 
Thank you very much for this. if you dont mind.. pls tell me, how to
pass the parameter to the stored procedure as i have never used stored
procedure before and also how to check what it retrived( i mean 1 or
0)

Please don't take this the wrong way, but database integration is absolutely
*fundamental* to any sort of web application...

I appreciate that you are a newbie - we were all newbies once - but you are
going to struggle very badly unless you acquire some very basic ASP.NET
knowledge...

I suggest you get a copy of this:
http://www.amazon.com/ASP-NET-Every...8662182-0953532?ie=UTF8&qid=1177696190&sr=8-2

and work your way through it...

Otherwise, you're going to be forever asking "What do I do next?", "What do
I do next?"...
 
Please don't take this the wrong way, but database integration is absolutely
*fundamental* to any sort of web application...

I appreciate that you are a newbie - we were all newbies once - but you are
going to struggle very badly unless you acquire some very basic ASP.NET
knowledge...

I suggest you get a copy of this:http://www.amazon.com/ASP-NET-Everyday-Apps-Dummies-Computer/dp/07645...

and work your way through it...

Otherwise, you're going to be forever asking "What do I do next?", "What do
I do next?"...

--http://www.markrae.net

Thank you for your advice.. i really appreciate you.
 
Back
Top