Need advice on prompting user for password on Access database

Need advice on prompting user for password on Access database

am 11.06.2006 00:36:45 von jmev7

I am writing an ASP page (classic, not .net) to an Access database, and am
considering sending the user to a start page where they are to provide the
DB password. Would prefer not to use user level security - yet. At this
start page, they would enter in the DB password, I would write this to a
cookie, and all the calls to open the database would read this cookie. Can
any one see any problems with this, or can anyone put up some sample code to
expedite my efforts?

Thanks.

Re: Need advice on prompting user for password on Access database

am 11.06.2006 00:57:51 von exjxw.hannivoort

jmev7 wrote on 11 jun 2006 in microsoft.public.inetserver.asp.db:

> I am writing an ASP page (classic, not .net) to an Access database,
> and am considering sending the user to a start page where they are to
> provide the DB password. Would prefer not to use user level security -
> yet. At this start page, they would enter in the DB password, I would
> write this to a cookie, and all the calls to open the database would
> read this cookie. Can any one see any problems with this, or can
> anyone put up some sample code to expedite my efforts?

<%
user = validate(response.cookies("user"))
pw = validate(response.cookies("pw"))
.....
SQL = "Select * from Tbl Where"_
" user = '"& user & "'" &_
" and pw = '"&validate(pw)&"'"

set mDATA=CONNECT.Execute(SQL)
if mData.EOF then reponse.redirect "notLoggedin.asp"
%>

............




--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Re: Need advice on prompting user for password on Access database

am 13.06.2006 00:01:32 von jmev7

Thank you, but the explanation you gave was not enough for me to follow. I
did some research and learned that I could effectively use the session
variable for the log in. I created a login page to log in and write the
session var, forced the user back to this page if the var was not set as
expected, and used the session var value to log into the database on each
call within the session. It works quite well.

Thanks again.

"Evertjan." wrote in message
news:Xns97DF9CF73DEBeejj99@194.109.133.242...
> jmev7 wrote on 11 jun 2006 in microsoft.public.inetserver.asp.db:
>
>> I am writing an ASP page (classic, not .net) to an Access database,
>> and am considering sending the user to a start page where they are to
>> provide the DB password. Would prefer not to use user level security -
>> yet. At this start page, they would enter in the DB password, I would
>> write this to a cookie, and all the calls to open the database would
>> read this cookie. Can any one see any problems with this, or can
>> anyone put up some sample code to expedite my efforts?
>
> <%
> user = validate(response.cookies("user"))
> pw = validate(response.cookies("pw"))
> ....
> SQL = "Select * from Tbl Where"_
> " user = '"& user & "'" &_
> " and pw = '"&validate(pw)&"'"
>
> set mDATA=CONNECT.Execute(SQL)
> if mData.EOF then reponse.redirect "notLoggedin.asp"
> %>
>
> ...........
>
>
>
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)

Re: Need advice on prompting user for password on Access database

am 13.06.2006 20:13:02 von Kyle Peterson

good you got things working

fool around with the free version of www.aspprotect.com while your at it

"jmev7" wrote in message
news:e6koes$ev6b$1@news3.infoave.net...
> Thank you, but the explanation you gave was not enough for me to follow. I
> did some research and learned that I could effectively use the session
> variable for the log in. I created a login page to log in and write the
> session var, forced the user back to this page if the var was not set as
> expected, and used the session var value to log into the database on each
> call within the session. It works quite well.
>
> Thanks again.
>
> "Evertjan." wrote in message
> news:Xns97DF9CF73DEBeejj99@194.109.133.242...
>> jmev7 wrote on 11 jun 2006 in microsoft.public.inetserver.asp.db:
>>
>>> I am writing an ASP page (classic, not .net) to an Access database,
>>> and am considering sending the user to a start page where they are to
>>> provide the DB password. Would prefer not to use user level security -
>>> yet. At this start page, they would enter in the DB password, I would
>>> write this to a cookie, and all the calls to open the database would
>>> read this cookie. Can any one see any problems with this, or can
>>> anyone put up some sample code to expedite my efforts?
>>
>> <%
>> user = validate(response.cookies("user"))
>> pw = validate(response.cookies("pw"))
>> ....
>> SQL = "Select * from Tbl Where"_
>> " user = '"& user & "'" &_
>> " and pw = '"&validate(pw)&"'"
>>
>> set mDATA=CONNECT.Execute(SQL)
>> if mData.EOF then reponse.redirect "notLoggedin.asp"
>> %>
>>
>> ...........
>>
>>
>>
>>
>> --
>> Evertjan.
>> The Netherlands.
>> (Please change the x'es to dots in my emailaddress)
>
>