Date:  05/31/2002 11:04:15 PM Msg ID:  000679
From:  Joe Goldsmith Thread:  000679
Subject:  SetVar and GetVar

Hello. I am having a hard problem setting a variable so I can capture it later and query a table. Here is the code using FoxWeb authenicate code to log in the user:

ClientLogin.FWX

      CASE Auth.NewLogin
       SET CENTURY ON
       IF USED('clients')
        SELECT clients
        USE
       ENDIF
       USE pbs!clients IN 0
       SELECT CLIENTS
       LOCATE FOR clients.userID = Auth.UserID
       pUser = ""
       pUserID = ""
       pUser = clients.clientid && unique client ID
       Session.SetVar(pUserID,pUser) && save unique id to var pUserID
       USE
       Response.Redirect("http://localhost/pbs/clienthome.fwx")

clienthome.fwx

<%
lcClientID = Session.GetVar(pUserID) && Error Here - Can't find var pUserID
USE c:\inetpub\wwwroot\data\pbs!vClientProfile NODATA SHARED IN 0  && local view
SELECT vClientProfile  && Select view
vClientID = lcClientID  && set value for parameratized view
=REQUERY()  && fetch record
%>

What am I doing wrong setting and getting a session variable?

Joe