NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: RichBowman on December 05, 2011, 02:10:20 PM
-
I found the following information in a post from March 2009 regarding multiple datasets.
**************************************************************************************************************
Incidentally, you should set it from a SessionQueue variable, ideally not a GetValue setting. If you are passing in some stuff via the URL, then ideall use StoreValue to store this in the SessionQueue, before then using the SessionQueue variable when setting the file's path.
ie
self.StoreValue('dataset')
customersfilename = p_web.GSV('dataset')
**************************************************************************************************************
Once I determine the dataset needed in the Login procedure, am I setting the data folder path or the entrie fully qualified name for each table. For example am I setting K:\BSCPGH or K:\BSCPGH\CUSTOMER.DAT?
Also, I'm not sure what command to use????
-
Hi Rich,
When you determine the folder where the dataset for this particular user id (like in the login procedure) store the path in a sessionvar:
p_web.ssv('datafolder',datafolder)
a) in the dict set the full path name for the file to be a variable
like !customer .
Make sure that customer is a threaded var
b) In the ProcessLink method, before parent call, set the variable based on a session value.]
like customer = p_web.gsv('datafolder') & '\custtomer.dat'
Make sure that Variable is threaded.
ssv means Set Session Var
gsv means Get Session Var
Remember that. You're going to use these a lot.
Hope thiis helps a bit.
Cheers,
Rene
-
perfect reply Rene !
-
Thank you Rene, that seems very clear.
-
This may be obvious, but I suppose the variable used to define the filename in the .dct must be a threaded Global variable also defined in the .dct. Correct?
-
Yup.
Rene
-
It doesn't _have_ to be declared in the Dict, but it is (by a long way) the right way to do it.
cheers
Bruce