Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I access another Data Session without selecting it
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00461208
Message ID:
00461237
Vues:
14
Thanks Bret

This looks like a hot tip:)

I will go and experiment.



>>Sometimes when I am in a private datasession there is a value in another data session I want.
>>
>>I realise I can use set datasession to switch back to the other session
>>get the value and then switch back again but I wondered if there was a different way that I have missed.
>>
>>ThanksHave you look at the USE command with the NOREQUERY and optional nDataSession parameter. From Hackers Guide:
>
>NOREQUERY, on the other hand, is utterly useless by itself. It's supposed to prevent data from being loaded a second time when you open a view AGAIN. Great idea, but as far as we can tell, that's what happens automatically when you USE a view AGAIN. You don't need NOREQUERY for that.
>
>With the optional nDataSession parameter, NOREQUERY is pretty cool. If you have the same view open in several data sessions, you can open it again and specify which data session's version of the view should be "borrowed" to populate the newly opened view. With a parameterized view, each data session might contain a different set of records, so you can decide which set you want. The newly opened view is populated with the last committed data from the specified view—what we'd see with OldVal(), not the current data in that view. If the user has changed some data but the changes haven't been saved to the original data source, the new view doesn't see those changes (which is as it should be).
>
>HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform