Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make Memory variables use Private Data Sessions
Message
De
11/11/2001 19:09:39
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00580254
Message ID:
00580319
Vues:
36
Gerard,

You won't have to worry about the data session, because when you use SCATTER NAME MyRecord, the object MyRecord is scoped to the form (you'll need to create a form property called MyRecord).

Only problem is that you *will* have to change all your ControlSources from m.MyField to MyRecord.MyField.

HTH,
~~Bonnie


>Hi.
>If I use Scatter Name Object, can a distinction be made between data sessions ?
>
>Regards,
>
>Gerard
>
>
>
>
>
>
>>Almost, not quite ... < g >
>>
>>it's SCATTER NAME < object name > (not SCATTER MEMVAR NAME < object name >)
>>
>>
>>~~Bonnie
>>
>>
>>>>Hi,
>>>>I am converting a 'lot' of screens from 2.6 to 6 and have made the screens Private Data sessions.
>>>>
>>>>Typically, I have a button on the screen which Scatters Memo Memvar and all the fields have M.MyfieldX as Control Source.
>>>>(At this stage, I dont want to change to Views Yet)
>>>>
>>>>However, even though the DataFiles are behaving correctly in their Private Data Sessuins, the Memory Variables (which are my ControlSources) seem to still be shared If I have , say two screens open, for 2 separate account records)
>>>>
>>>>I'm wondering is this behaviour correct or can I do something that ensures that my memory variables are private as well.
>>>
>>>The memory variables scope isn't affected by setting datasession to private. It means that SCATTER MEMVAR in Fox 2.x format cannot be used in forms if you want to open more than one copy of the form. The clossest thing to your approch is to use SCATTER MEMVAR NAME < object name > and GATHER MEMVAR NAME < object name >. Just remember that there is no INSERT FROM MEMVAR NAME < object name >.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform