NetTalk Central

Author Topic: Multiple Datasets  (Read 4273 times)

RichBowman

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • Email
Multiple Datasets
« 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????

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Multiple Datasets
« Reply #1 on: December 05, 2011, 03:07:45 PM »
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
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Multiple Datasets
« Reply #2 on: December 05, 2011, 09:26:43 PM »
perfect reply Rene !

RichBowman

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • Email
Re: Multiple Datasets
« Reply #3 on: December 06, 2011, 07:57:30 AM »
Thank you Rene, that seems very clear.

RichBowman

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • Email
Re: Multiple Datasets
« Reply #4 on: December 06, 2011, 08:22:54 AM »
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?

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Multiple Datasets
« Reply #5 on: December 06, 2011, 02:53:13 PM »
Yup.

Rene
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Multiple Datasets
« Reply #6 on: December 06, 2011, 09:44:49 PM »
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