Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
At what time the property DataSessionID is set?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00518513
Message ID:
00518536
Views:
5
>I am using a form with private datasession.
>The form do not have any tables open. In the Load Event I open the tables.
>
>In the Init() of the form I want to use the table but the DataSessionID is set to 1.
>
>If I suspend the excution in the init() I can see the DataSession # 4 created for my form but the DataSessionID is not set to 4.
>
>Any one know when the DataSession is set to my privated datasession?

I would say no sooner than the Form's Show event. I tried setting a breakpoint on when Set('Datasession') changes, but the debugger did not trap that change. I dropped SET('DataSession') in the debugger Watch window, then clicked in the left column to set the breakpoint.

To test this, I issued DO FORM TEST NOSHOW from the command window. The DS ID was still the default of 1. At that point I do know th Load and Init have already fired. I then issued Test.Show(), and the DS ID changed to 2.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform