Hi Vlad,
First of all, thanks a lot for the quick response.
I'd like to distinguish Form's DS from my application DS, IOW, I don't want to overload Form's DS with the tables, which are not relevant to this form. Besides, I may want to open the table, which is used in this form, and do some work on it. That's why I like to keep my application DS separate from calling form DS. That's why I tried the code, I showed, but it didn't work.
Therefore, my question is: is it possbile at all to create a separate DS for my application (which currently consists only of programs) or I need to re-organize my application and create class with methods, instead of just programs. I know, this technique works, if there is another object (class) involved (as in my other colleague code this technique works just fine, but he uses classes). I just don't want to complicate my life yet, if it's not absolutely necessary. I was thinking about thisform.lockscreen (though I doubt, it would work).
Do you have ideas for me?
Thanks in advance.
>Hi!
>
>I never even tried to work with data session by that way because I know a lot of bad things about it. Private data sessions are not reliable in VFP even when used by usual way, what say about manual editing?
>
>What the goals you want to get to when trying to make data session object manually?
>
>Note that grids are cleared out probably because original data session for form with grids is gone out of scope somewhere during application running. I think this occurred because data session you made is not native for form.
>
>> We have a main application, called JobControl, which in turn calls other applications. I have my application, called Stats. This application currently consists of several programs, which perform different statistics calculation. They worked in Form's DS. Today I decided, that it would be better to distinguish JobControl Form's DS from Stats DS, so I added the following in Stats main program: (commented this code for now):
>>>>><<<<
>>
>>When I finish with my app and return to JobControl Form, all grids appear empty. What can I do, to prevent this behavior? Is it valid to create a new DS in a program or it would work only for class?
If it's not broken, fix it until it is.
My Blog