NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Robert Iliuta on April 18, 2012, 12:54:57 AM
-
Hallo,
I have a project where a user login and work for many companies on the same session. User will just change the company on the fly in the session. I have around 100 session values in queue. My questions is how can I delete all this values from session queue when user change the company? Can I get a list with all my session values? Is there a way to loop and delete them?
A lot of work to clear by hand ... Also very hard to find them in all procedures.... :o))
Thank you for any help/suggestions,
Regards,
Robert
-
Hi Robert,
yes, you could just manipulate the session queue directly.
Do you have the NetTalk book? There's a section in there on manipulating the queue.
If not, then just look at the inc file to see the sessionDataQueue definition, and go from there.
Cheers
Bruce
-
Thank you Bruce. Found the inc file and the queue's. But very hard to filter the queue to see only my variables... this queue keep a lot of other info.
Maybe a good way is to rename all my variable to something like this: w:MyVariable, p_web.SSV('w:MyVariable',1) , this way I could filter and see only my variable.
Regards,
Robert
-
perhaps Robert the real question is;
Can you delete _all_ of them when the user changes login?
From NetTalk's point of view, if you are effectivly changing a data set, and the user is "starting again" from the Login page, then you could just do a "DeleteSession" - which wold result in all the session variables being deleted.
cheers
Bruce
-
>Can you delete _all_ of them when the user changes login?
No, not all of them. This is the point. I want to delete _only_ my own variables. User changes only the company not login. One user could work for many companies...
>and the user is "starting again" from the Login page
No it's not starting from Login page. He is on the same session, and just change the company. Not different data just filter by ID from the same data base.
My problem is that every company has different number of employes etc. Then when I change the company I need to reset all my session variables because this company has different values...
Loop trough queue and clear _only_ my variables it's a good point, instead of p_web.SSV('MyVariable','') hundred of times...
Regards,
Robert
-
ok, in that case I think your idea of some special prefix is a good one. That way you can just do a loop, and look for all the variables with that prefix.
Cheers
Bruce