oApp can not see the table and does not need to. Because I am passing the TableName and the name of the Key field to my GetKeyID function, I do not have to see the table I am getting an ID for. My Kounters table has 3 fields, TableName, KeyName and Kount. I issue a
Locate for TableName == lcTableName and KeyName == lcKeyName. I lock that record then increment the Kount by 1 and return that value to the calling method.
>Hi Marc,
>
>I'm probably missing something, but is you are not in the default datasession, how come oApp can see the table?
>
>Thanks for caring,
>
>Marc
>
>
>
>>Marc:
>>
>>I do not deal with DSID in my oApp.GetKeyID method. What I pass to the method is the TableName and the KeyName. My primary key generator searches my Kounters table for a matching TableName and KeyName. If not found, I append blank and start the Kount at 0 [next ID will then be 1 -- I track the last used number]. My oApp object used the default DS [1].
Mark McCasland
Midlothian, TX USA