Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
USE DBF() AGAIN not working outside Private form
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00199080
Message ID:
00203538
Vues:
15
>Recently, I fiddedl with the idea of transfering records like parameters into another form. Obviously, iusing the cursor came first to mind.
>
>Hello again,
> I have played with this idea as well. One observation I came across that might be useful, calling an object method switches to the datasession that was current when it was created. If all you need is access to cursors in a separate datasession you might try the following:
> lnDataSessionID = SET("DATASESSION")
> SET DATASESSION TO {DataSession of other form}
> *-- cstMyData has methods to access data from cursors
> This.oOtherData = CREATEOBJECT("cstMyData") && or AddObject to taste...

My mistake on the AddObject. The entire composite object "lives" in the same datasession. The behavior that I am describing will only happen with CREATEOBJECT.

> SET DATASESSION TO &lnDataSessionID
>The new object oOtherData "lives" in the other form's datasession and can access all data inside it.
>
>HTH,
> Ned
Ned

Reality is.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform