Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening tables in Private datasessions
Message
 
 
À
16/08/2001 11:42:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00544750
Message ID:
00544754
Vues:
20
This message has been marked as the solution to the initial question of the thread.
>Hi
>
>I have created a report and have it running in a Private datasession. In the Init() of the report's DE I have included code that fires off a Method in my App Object that opens the relevant tables.
>
>The problem is that the App object does not open the tables because it thinks they are already open.
>
>Is this because the App Object was created in the Default Datasession and therefore will not look in the Report's private datasession?
>
>Any ideas?
>Thanks
>Kev

Yes. Objects live in the datasession where they were created. When you execute a method of an object, VFP implicitly changes datasessions to that datasession.

One suggestion would be to pass the datasession as a parameter and the open table method of your application could switch to it, open the necessary tables and switch it back when done (SDT works like this).

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform