NetTalk Central

Author Topic: Value Queue or Session Queue  (Read 2911 times)

Neil Porter

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • Email
Value Queue or Session Queue
« on: June 07, 2013, 01:18:43 PM »
I've been playing around with passing variables from one area of my program to another, and I always use Session variables.

I keep looking in the generated code, to try and get a better understanding of what Bruce is doing under the hood, and I notice that sometimes he uses Get/SetValue and other times he uses Get/SetSessionValue.

What is the real difference, and when is it appropriate to use each one?

Regards,

Neil.
Clarion 11.0.13244
NetTalk 11.04

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Value Queue or Session Queue
« Reply #1 on: June 09, 2013, 05:14:50 AM »
The key difference is scope. Values exist "on the thread" whereas SessionValues apply to the session.

So values are used to pass "parameters" if you like, from the browser to the server, on (on that thread) from one procedure to the next. At the end of the request (about a tenth of a second later) they vanish

SessionValues on the other hand exist for the life of the session.

cheers
Bruce



Neil Porter

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • Email
Re: Value Queue or Session Queue
« Reply #2 on: June 10, 2013, 11:23:48 AM »
Thanks Bruce,

That makes sense.

Regards,

Neil.
Clarion 11.0.13244
NetTalk 11.04