I do not quite understand what your scenario is but it mainly depends on =
what authentication mechanism you are using. What do you mean by "logged =
in"??'
Do you create a cookie? a session variable?? are you using Forms =
Authentication??
If using Forms Authentication then you would have to call the SignOut =
method
System.Web.Security.FormsAuthentication.SignOut()
If using an authentication personalized cookie then you would have to =
set it to a date that already passed
myCookie.Expires =3D DateTime.Now.AddDays(-1)
If using a session variable then you would have to call Session.Abandon =
or set Session("MySession") =3D Nothing or set a flag in a session =
variable to indicate that the user is not logged in anymore
Anyway IMHO resetting the connection to the database would not make an =
accurate solution. Please detail your scenario
Hope this helps
Alan Ferrandiz Langley
MCDBA, MCT, MSF Practitioner
"Steven" <anonymous@discussions.com> escribi=F3 en el mensaje =
news:#XNsJIRiEHA.3016@tk2msftngp13.phx.gbl...
[quoted text, click to view] > Hi,
> I have created a web page where I enter my login id, password, and =
then my
> page connects to my database to see if the user is authenticated. If =
he is,
> he can proceed further with other pages.
> Please help me to knbow how do I log out a user once logged in? Just =
reset
> the connection to database?
> Is there a proper way to do this?
> Thanks.
>=20
I set up the connection string with the USE AND PASSWORD. I open the
connection and check for errors.
Set Con = Server.CreateObject("ADODB.Connection")
Con.ConnectionTimeout=40
U=Request.Form("USER_ID")
P=Request.Form("Password")
ConStr="Provider=MSDASQL.1;Password=" & P & ";Persist Security
Info=True;User ID=" & U & ";Data Source=XXX"
Con.Open ConStr
If Err.Number<>0 Then
Authorized=0
Else
Authorized=1
End If
Con.Close
Set Con=Nothing
[quoted text, click to view] "Steven" <anonymous@discussions.com> wrote in message
news:%23XNsJIRiEHA.3016@tk2msftngp13.phx.gbl...
> Hi,
> I have created a web page where I enter my login id, password, and then my
> page connects to my database to see if the user is authenticated. If he
is,
> he can proceed further with other pages.
> Please help me to knbow how do I log out a user once logged in? Just reset
> the connection to database?
> Is there a proper way to do this?
> Thanks.
>
>