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:
00518522
Views:
7
This message has been marked as the solution to the initial question of the thread.
>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?

Unless you change DS in code, it should be set automatically, when form loads.
At least, I always open tables in form's load and never had a problem. Usually I do it this way:

main program of application
parameters tcFileName, tcOperation && Note, here I use parameters, so they would be visible in form's load
     do form myMainform
Form's load:
   if !myFormInit(m.tcFileName, m.tcOperation)
      && some problems occur
      return .f.
   endif
   return dodefault()
I do opening of tables in myFormInit program.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform