|
 |
access_asp thread: Access database - ASP help
Message #1 by "Rinku Kadakia" <rinku.kadakia@p...> on Wed, 11 Dec 2002 20:27:05
|
|
Hello Everyone,
I am just stuck at this thaught. So might be someone can help.
I want to do a query against access database by sending loginid, password
and area.
Databse contains:
loginid = 123456
password = abcdef
area = finance
This is where i need help.
if the suplied entry is in the database then it should return back saying
its valid and should take the user to the finance.htm page or else give an
error message.
Can some one please help. Thanks for your help in advance.
Rinku
Message #2 by "Ken Schaefer" <ken@a...> on Thu, 12 Dec 2002 13:01:33 +1100
|
|
<%
strSQL = _
"SELECT Area FROM Users WHERE LoginID = '123456' AND UserPassword
'abcdef'
Set objRS = objConn.Execute strSQL,adCmdText
If not objRS.EOF then
strRedirect = objRS("Area")
Else
strRedirect = "/error.asp"
End If
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
Response.Redirect(strRedirect)
%>
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Rinku Kadakia" <rinku.kadakia@p...>
Subject: [access_asp] Access database - ASP help
: Hello Everyone,
:
: I am just stuck at this thaught. So might be someone can help.
:
: I want to do a query against access database by sending loginid, password
: and area.
:
: Databse contains:
: loginid = 123456
: password = abcdef
: area = finance
:
: This is where i need help.
:
: if the suplied entry is in the database then it should return back saying
: its valid and should take the user to the finance.htm page or else give an
: error message.
:
: Can some one please help. Thanks for your help in advance.
:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
 |