Hi Robert,
>> Simply you fetch table and then do: p_web.FileToSessionQueue(User) ok, now all values from User table are in a session queue.
yes, but they will be overwritten by the templates during the normal running of the program. ie the FileToSessionQueue method is used internally as well.
In other words, if you want to create and use session variables, then use your own names for them - not the field names of tables. You would be better of creating
p_web.SSV('myID',USE:ID)
and so on and then using p_web.GSV('myID') where you needed it.
>> All the time I was thinking that NT use ValueQueue in a form and not SessionQueue.
The value queue lasts for the length of 1 thread. A single form may result in dozens of threads, so the Form (and Browse, and everytthing else) definitely uses the SessionQueue.
>> You cannot work with session variables ,...use them in a filter etc..
you can (and should) use session values in filters - but if you want a variable for your purposes, then you should create one with your own name - not re-use a dictionary field or something like that.
>> Maybe was a good idea to delete all of this variables if a user press cancel and not save button.
the Cancel button has nothing to do with the problem. The values are changed as you make changes on the form. ie as you enter each value on the form, it is immediately written into the session queue. You could close the browser tab, press ok, press cancel, do whatever you like - but the values are already in the session queue.
>> A solution to this is to use a prefix like: p_web.FileToSessionQueue(User,,'w-')
exactly.
>> where and how is used ValueQueuer?
the Value queue is indeed limited to a single thread. It contains the values of the incoming request, including cookies, URL parameters and post data parameters. In code there are some other uses as well for the Value Queue - basically as a parameter passing mechanism while on a single thread, on the server side.
SessionValues are Session wide.
Values are only in scope for the thread.
There is no "procedure" level variables because on the web "procedures" don't exist - at least not in the way they do in a Windows program. In Windows a procedure is bound onto 1 thread, whereas in the web a "procedure" is simply an event handler for dozens of different events all happening on different threads.
cheers
Bruce