Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LINKING A FREE TABLE TO A VIEW
Message
 
To
04/09/1997 19:21:30
Edward Crawford
City Facilities Management
Glasgow, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00048376
Message ID:
00048685
Views:
26
>>>>>>I am linking a free table to my input table in a view via a uniquely defined field. The link occurs in generating the view and I have no problem while running my program in VFP, but when I create my executable, it tells me it cannot find the table and asks if I want to locate it. I can then locate my table and my executable runs fine. But I don't want the user to have to go through that step.
>>>>>>
>>>>>>Any help?
>>>>>>
>>>>>>Barbara Smith
>>>>>
>>>>>Is your free table in VFP path?
>>>>Yes, it is.
>>>
>>>Are you in a form when you are doing this, and if so, are you useing a Private Data Session?
>>>
>>>Ed
>>Yes,I am displaying the result of the view on a grid in a form. But I don't know what a Private Data Session is so I'm probably not. The form is supposed to be used by multiple users showing their own unique (and exclusive) individual data. Do I need a private data session and, if so, how do I do it?
>>
>>Barbara
>
>Barbara:
>
>You might try a private data session. In your form properties, change data session to 2 -Private Data Session. Add your free tables to this data session in the Load Method useing the usual method ie:
>SELECT 0
>USE table ALIAS Table
>
>If you make any calls to any methods outside of your form you are going to need to pass the DataSessionId property of the form to the method. At the top of this method type the command:
>
>LPARAMETERS lnDataSession
>SET DATASESSION TO lnDataSession
>
>This is not necessary if you are calling a method in the form. If you do not do this, any updates to tables will reflect int he default data session and not the private one.
>
>Hope this works.
>
>Ed

This is sort of related: I have a form1.DataSession = 1-default data session. A button.click has:

USE mytable
SET ORDER TO mytag
=THISFORM.Hide()
DO FORM form2 WITH someparameter

form2.DataSession also = 1-default data session. But the table is closing when form2 opens. That started happening when I changed form2 from modal to modeless. It makes no difference whether I add mytable to the form2.DataEnvironment. This seems pretty basic, but what is wrong?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform