Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I specify a different data environment at run tim
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00122256
Message ID:
00122260
Views:
18
>I have a form that needs to receive a data path parameter that will then overwrite the data environment originally specified at design time.
>
>After looking through all documentation, I have set the data environment's AutoOpen property to .F. and place table opening code in the OpenTables method. However, when a form receives parameters which are received by the Form.Init Method, the data environment has already been established.
>
>How can I trap these parameters passed to the form before the data environment is set?
>
>P.S. The form is part of a FormSet

If you have an application object, create an array called aFormParameters. Just prior to issuing DO FORM from somewhere, fill the array with whatever parameters you need including the datasession id that you desire. In the .BeforeOpenTables event of the form, scan the aFormParameters array and assign the datasession id to your form. Just a thought.

Steve
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform