NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: dbourrut on July 30, 2009, 06:35:51 AM

Title: Defining session variables
Post by: dbourrut on July 30, 2009, 06:35:51 AM
In a straight Clarion app we use global variables. The WebServer docs clearly explain that one needs to use session variables. It shows how to reference a session variable.

How do you define a session variable. Is it simply by using it?

Thanks,

Drew
Title: Re: Defining session variables
Post by: Bruce on July 30, 2009, 06:56:10 AM
Hi Drew,

yes, you don't need to "declare" session values. Rather you just "use them". So use SSV (SetSessionValue) to create, or update one, and GSV (GetSessionValue) to read it.

If you read a value that does not exist then a blank string is returned to you (ie 0 if you are reading into a long etc.)

Cheers
Bruce