Thanks Bruce.
There is another aspect of this 'Global variables via an In Memory Table' approach that I need some advice on.
It relates to the size of the variable pool and the expected number of concurrent sessions. For a small pool where one row in a table will hold all of the data this is obviously not going to be an issue but in my case I have replicated a Group (with 17 fields) that has a Dimension of 2000 as a Table - so 34,000 fields per session. Most of these fields are of type 'Real' and I'm not sure how many bytes are allocated but say 8 which means about 276KB per session. Now how many concurrent sessions - hopefully lots but indeterminate.
So for this reason I decided that it would not be safe to just delete the session records in the NotifyDeleteSession method since that would mean that all 2000 rows would be around for all active sessions. Because within a session a user can perform many actions that cause the values of all of these variable to change I actually delete all of the session rows before recalculating the values (and the rows) so I only get one set of 2000 rows per session.
The other complication is that the reason for doing all of this is that I currently have three Graph procedures which load data from my Table (hence the need for 'global' variables).. So I want to delete the session rows for a single request after all of the procedures have completed.
After getting a request to 'recalculate', in ProcedureA I delete the current session rows and recreate (writing a new 2000 rows). ProcedureA also calls for the three Graphs to be reset and I have three procedures executing out of three separate windows. In each of these the Graph data is loaded from the Table.
First question is: if in the Reset list on the Client Side tab the three graphs are (in order) - Graph1, Graph2, Graph3 then could I assume that all of the processing is complete at the end of the loading of the data for Graph3 and could I delete the session rows then?
Second question is: because the above solution feels a bit clunky and depends on the order of the Reset list which is not obvious and may change would it be better to control this by setting a local variable loc:numberofgraphs to 3, decrementing in the load code for each graph and deleting the session rows when it gets to 0?
Third question is: Is it possible to generate three graphs in one procedure?
Thanks
Keith