Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you get a Form to recognize an open Data Session
Message
From
14/11/1997 13:02:27
 
 
To
14/11/1997 12:17:48
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00060289
Message ID:
00060306
Views:
24
>>>SET DATASESSION TO nDsnumber
>>>Thanks for the reply. It seems to be similar to the "SET VIEW TO myview" command. Where exactly do I place this snippet of code?
>
>Where to issue this command? I don't know, it depends on your app flow. Maybe Form.Load event would be appropriate.

It seems maybe that you are a little unclear on Private datasessions vs. Default datasessions, and DSs in general as they apply to forms. When designing a form and adding tables to the datasession, the datasession you are building is the datasession for that form. You can duplicate it in any other form. If you want the datasession scoped only to that form, and record pointers to be independent of the positions in other forms or datasessions, you should set your form to use Private datasessions. If you would like a movement of the record pointer to be reflected in all forms, set the form to use the default datasession.

I apologize if I am trying to explain a concept that you are already familiar with, but I got he feeling that you are going about your app design wrong. There should be very few instances (if any) that you should have to use SET DATASESSION. In general, your app should either use only private datasessions, or only the default datasession, with exceptions only where they are specifically needed. It can all be little confusing at first, but makes complete sense after you are familiar with it. My personal preference is using only private datasessions, and letting each form take care of positioning the record for itself. Just trying to point you in the right direction. HTH
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform