Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

SetSessionVar Not Storing Logical Values

$
0
0
SetSessionVar Not Storing Logical Values
Web Connection 5.0
SetSessionVar Not Storing Logical Values
Feb. 27, 2013
12:51 pm
3Q50RJVVAShow this entire thread in new window
Gratar Image based on email address
From:Roy M
To:All
VFP Version: 8 Wconnect Version 5.63

I am attempting to store a variable into the wsession table. Code below:

session.setSessionvar('admin',this.oUSERSECURITY.oUser.Admin)

This does not record the variable in the wsession table. However, a numeric value is stored see code below:

session.setSessionvar('logoncount',this.oUSERSECURITY.oUser.logoncount)

Am I to assume that logical values must be converted before storing them in the session table?

From the SetSesionVar function there is a check done on the the value ... if empty(lcvalue) ... lcvalue is recorded with "". When a numeric value is passed ... all seems to work well ...

Debug screen shows the test for empty(lcvalue) as .T. and then store "" into lcvalue. As a result of this the variable is not stored with the session

<span style="{font-size: xx-small; color: red;}">Code parsing for language: "'VFP" is not currently supported.<br></span>
FUNCTION SetSessionVar
LPARAMETERS lcVarName, lcValue
LOCAL lctext, lcValue, lcOldAlias, loData

lcVarName = lower(lcVarname)

loData = THIS.oData

IF EMPTY(lcValue)
   lcValue = ""
ENDIF   



Viewing all articles
Browse latest Browse all 10393

Trending Articles