Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get data from different Datasession
Message
 
 
À
03/05/2006 14:59:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01118879
Message ID:
01118911
Vues:
14
Zahid,

Data isn't really supposed to cross the DataSession boundary.

If the dataset is small enough you can use XML, or something like a temporary .dbf file that can be re-opened in the second data session.

Usually if I have a "child" form that needs access to a "parent's" form data, I will set the parent (launching form) to a Private DS, the child form is set to Default DS, which will cause the child form to be launched inside the DS of the first form. The child form can then do what it needs and make sure it only cleans up the cursors that it creates while it is running. This avoids all of the problems of getting data across the DS boundary.

>Hi
>How to get data from a different Datasession to current datasession
>from formA to formB.
>
>Form A & B both have private datasessions.
>
>formB is Model in the Init of formB
>
>***************formB.Init()**************
>lparameters lnDataSessionId
>*
>local lnCurDS
>*
>lnCurDS = this.datasessionid
>set datasession to lnDataSessionId
>select * from sal_tmp into cursor tmp
>set datasession to lnCurDS
>*****************************
>
>
>Cursor tmp is created in formA's datasession I want it to be created in formB's datasession. How to do this.
>
>I run formB from formA like this:
>
>  do form formB with ThisForm.DataSessionID
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform