Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Username and Password

Reply
Thread Tools

Username and Password

 
 
Ahmd
Guest
Posts: n/a
 
      05-13-2007
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

 
Reply With Quote
 
 
 
 
Mark Rae
Guest
Posts: n/a
 
      05-13-2007
"Ahmd" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...

> 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?



--
http://www.markrae.net

 
Reply With Quote
 
 
 
 
Ahmd
Guest
Posts: n/a
 
      05-13-2007
On May 13, 12:31 pm, "Mark Rae" <(E-Mail Removed)> wrote:
> "Ahmd" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) ups.com...
>
> > 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?
>
> --http://www.markrae.net


I use SQL Datasource to connect to sql server.

 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      05-13-2007
"Ahmd" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...

> 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...

--
http://www.markrae.net

 
Reply With Quote
 
Ahmd
Guest
Posts: n/a
 
      05-14-2007
On May 13, 5:30 pm, "Mark Rae" <(E-Mail Removed)> wrote:
> "Ahmd" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) oups.com...
>
> > 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...
>
> --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

 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      05-14-2007
"Ahmd" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...

> On May 13, 5:30 pm, "Mark Rae" <(E-Mail Removed)> wrote:
>> "Ahmd" <(E-Mail Removed)> wrote in message
>>
>> news:(E-Mail Removed) oups.com...
>>
>> > 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...
>>
>> --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


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


--
http://www.markrae.net

 
Reply With Quote
 
Ahmd
Guest
Posts: n/a
 
      05-14-2007
On May 14, 9:51 am, "Mark Rae" <(E-Mail Removed)> wrote:
> "Ahmd" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) oups.com...
>
>
>
>
>
> > On May 13, 5:30 pm, "Mark Rae" <(E-Mail Removed)> wrote:
> >> "Ahmd" <(E-Mail Removed)> wrote in message

>
> >>news:(E-Mail Removed) groups.com...

>
> >> > 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...

>
> >> --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

>
> 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..

 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      05-14-2007
"Ahmd" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...

> 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-Everyd...7696190&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?"...


--
http://www.markrae.net

 
Reply With Quote
 
Ahmd
Guest
Posts: n/a
 
      05-14-2007
On May 14, 1:55 pm, "Mark Rae" <(E-Mail Removed)> wrote:
> "Ahmd" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) ups.com...
>
> > 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-Everyd...puter/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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change a users password without knowing the old password nor the answer to the password question AAaron123 ASP .Net 1 01-16-2009 02:56 PM
Changing a users password without knowing the old password nor the answer to the password question AAaron123 ASP .Net 2 01-16-2009 02:08 PM
loginview control displays network username instead of (web) username Shailesh Patel ASP .Net Web Controls 0 11-08-2006 08:19 PM
automatic fill in username and password ngoc Firefox 0 09-27-2005 04:46 PM
Change the username found in "C:\Documents and Settings\Username" The Reluctant Robot Named Jude Computer Support 1 05-05-2004 07:11 AM



Advertisments