M
Mike Mueller
I am using what is probably now considered access database
authentication. I want to take it to the next step, and
pulling the first name from the mdb file and placing that
into a session variable. I would then retrieve that session
variable and personalize the members pages. The problem I
have is that it appears that the session variable for the
name seems to be blank. Here is the sql statement from the
validation page and the retrieval portion from the members
pages.
-----Connection String, validation code, and save to
variables
strSQL1 = "SELECT * FROM Roster WHERE UserName = '" & _
strUserName & "' AND Password = '" & _
strPassword &"'"
Set objConn = Server.CreateObject ("ADODB.Connection")
objConn.Open application ("Database1_ConnectionString")
Set objRS1 = objConn.Execute (strSQL1)
If Not objRS1.EOF Then
strCurrentUser = RecordSet.Fields("First_Name")
Session("bolAuthenticated") = True
Session("strUserName") = strUserName
Session("CurrentUser") = strCurrentUser
-----Retrieve the information and display the name on the
menu page
<html>
<%
Dim CurrentUser
CurrentUser = Session("strCurrentUser")
%>
<head></head>
<body>
<h2 align="center">
Welcome to the Members Menu</h2>
<p align="center">Current User: <%=CurrentUser%>
</p>
<p> </p>
Here is the menu
</body></html>
authentication. I want to take it to the next step, and
pulling the first name from the mdb file and placing that
into a session variable. I would then retrieve that session
variable and personalize the members pages. The problem I
have is that it appears that the session variable for the
name seems to be blank. Here is the sql statement from the
validation page and the retrieval portion from the members
pages.
-----Connection String, validation code, and save to
variables
strSQL1 = "SELECT * FROM Roster WHERE UserName = '" & _
strUserName & "' AND Password = '" & _
strPassword &"'"
Set objConn = Server.CreateObject ("ADODB.Connection")
objConn.Open application ("Database1_ConnectionString")
Set objRS1 = objConn.Execute (strSQL1)
If Not objRS1.EOF Then
strCurrentUser = RecordSet.Fields("First_Name")
Session("bolAuthenticated") = True
Session("strUserName") = strUserName
Session("CurrentUser") = strCurrentUser
-----Retrieve the information and display the name on the
menu page
<html>
<%
Dim CurrentUser
CurrentUser = Session("strCurrentUser")
%>
<head></head>
<body>
<h2 align="center">
Welcome to the Members Menu</h2>
<p align="center">Current User: <%=CurrentUser%>
</p>
<p> </p>
Here is the menu
</body></html>