473,320 Members | 1,926 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Username and Password

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

May 13 '07 #1
8 1868
"Ahmd" <mk*******@gmail.comwrote in message
news:11*********************@q75g2000hsh.googlegro 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

May 13 '07 #2
On May 13, 12:31 pm, "Mark Rae" <m...@markNOSPAMrae.netwrote:
"Ahmd" <mkahme...@gmail.comwrote in message

news:11*********************@q75g2000hsh.googlegro 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.

May 13 '07 #3
"Ahmd" <mk*******@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr 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

May 13 '07 #4
On May 13, 5:30 pm, "Mark Rae" <m...@markNOSPAMrae.netwrote:
"Ahmd" <mkahme...@gmail.comwrote in message

news:11**********************@p77g2000hsh.googlegr 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

May 14 '07 #5
"Ahmd" <mk*******@gmail.comwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...
On May 13, 5:30 pm, "Mark Rae" <m...@markNOSPAMrae.netwrote:
>"Ahmd" <mkahme...@gmail.comwrote in message

news:11**********************@p77g2000hsh.googleg roups.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

May 14 '07 #6
On May 14, 9:51 am, "Mark Rae" <m...@markNOSPAMrae.netwrote:
"Ahmd" <mkahme...@gmail.comwrote in message

news:11**********************@k79g2000hse.googlegr oups.com...


On May 13, 5:30 pm, "Mark Rae" <m...@markNOSPAMrae.netwrote:
"Ahmd" <mkahme...@gmail.comwrote in message
>news:11**********************@p77g2000hsh.googleg roups.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..

May 14 '07 #7
"Ahmd" <mk*******@gmail.comwrote in message
news:11*********************@q75g2000hsh.googlegro 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

May 14 '07 #8
On May 14, 1:55 pm, "Mark Rae" <m...@markNOSPAMrae.netwrote:
"Ahmd" <mkahme...@gmail.comwrote in message

news:11*********************@q75g2000hsh.googlegro 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.

May 14 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Candice | last post by:
Please somebody help! I've deleted my admin username and password which was initially set at test. Now I can't log into my website as the administrator. How do I put Username and Password back so...
1
by: thoducng | last post by:
I am writing some code to access share folder on a remote network. DirectoryInfo dicInfo = new DirectoryInfo("remoteNetwork\shareFolder"); if (dicInfo.Exists) { //application code...
11
by: Kevin O'Brien | last post by:
Hello, I am creating a sign on screen for my application in which I want to store the username and password in a database table. I was thinking of putting a combo box connected to the database...
5
by: libra786 | last post by:
I have created a blog and have added a login box which prompts the user for login and id before posting- The username and password have been stored in the database, however when i enter the username...
0
by: roamnet | last post by:
hi i created database file with .mdf extention ,sql server as a source and use grid view to display data there're no problem in data retrieve and display,but i want to edit it or insert new...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.