Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I access another Data Session without selecting it
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00461208
Message ID:
00461218
Views:
14
>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
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform