NetTalk Central

Author Topic: Defining session variables  (Read 3448 times)

dbourrut

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • Email
Defining session variables
« 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Defining session variables
« Reply #1 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