>Hi All
>I am trying to understand the relation between private datasessions and object scoping. If I have a public object and in a method I put "SELECT tableA", which datasession it selects it in ?
>
>I would appreciate any thought on that topic. Thank you,
>Alex.
Hi Alex,
As far as I can tell VFP does the following:
1.) Stores the datasession ID that was current when the object was created
2.) Swaps in the datasession in 1.) whenever a method on the object is called
3.) Keeps a count of how many objects are associated with each private datasession and releases the datasession when the count reaches 0.
4.) Assigns the datasession of the parent object to a child created with AddObject
I have actually used the behavior in 3.) to create a datasession object for use in pre VFP6 development.
HTH,
Ned
Ned
Reality is.