Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
And DataSession's again...
Message
De
26/03/2003 12:26:43
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
And DataSession's again...
Divers
Thread ID:
00770299
Message ID:
00770299
Vues:
43
well, those datasession’s (DS) really drive me nuts. ok here it is - hopefully any of you out there have a suggestion of what i am so totally missing here:

in my app I am working so far with default DS, haven't had a need up until now to do it differently. now i need to start a form with the same tables (all free) as the 'parent' form. so i have the calling form as default DS and the called form as private DS. so far so good.

now, in the load method (and i tried the init as well) i call a custom class which resides on the _screen. this class will preload any user-access stuff needed for this form. Still, we are absolutely fine so far.

in that 'GetUserAcceess()' on the _screen i have to open the 'access' table containing the access information for each user and object - so i call _screen.DbfOpen('access'), which is another custom class residing on the _screen.

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.

ofcourse, after finishing DbfOpen() and going back to GetUserAcceess(), GetUserAcceess() tells me that the alias 'access' does not exist, which is correct because is has been opened in DS1.

now will someone PLEASE explain this to me, and tell me what I am doing wrong here?

thanks in advance
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform