Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
And DataSession's again...
Message
De
26/03/2003 14:21:05
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
 
À
26/03/2003 12:26:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00770299
Message ID:
00770395
Vues:
10
Hi Gunnar,

>and this is the point where my 'toaster' explodes! up until the point of calling _screen.DbfOpen('access') the datasession is 2 (a private one created from the 'child' form). however, the first line in DbfOpen() (right after the LPara statement) the DS has magically switched back to 1 - the default one.<

_SCREEN.DBFOpen is an object that is contained in the screen. Objects automatically use the DataSession they were created in so..., any methods called in DBFOpen will be in DS1. I never use SET DATASESSION except for debugging. If you need access to a cursor, you must create the objects you need in the datasession you will use them in.
The VFP way of switching datasessions is a very good thing. It's what enables you to say:
Form1.Save()
Form2.Revert()
and have both forms operate in their own DSs without any SET DATASESSION stuff from you.
Charlie
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform