Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Private datasessions for functions and procedures
Message
De
16/11/1999 23:07:25
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00291735
Message ID:
00291766
Vues:
19
Hi Evan,

>I would like my functions and procedures to have private datasessions. Three reasons:
>Can anyone point to towards some resources on how to do this? Any the cons to this idea?

If I'm not mistaken, thats what the Session object is for, just create an instance of one set to private, and set the datasession to that, walla, a new DS. Or even simpler, create an instance of a form class:
local lnDS

lnDS = set('datasession')
oSession = createobject('MySession')
set datasession to (oSession.DataSessionID)

*Code Stuff

set datasession to (lnDS)
release oSession

DEFINE CLASS MySession AS FORM

    Name = Session1
    DataSession = 2

ENDDEFINE
That should be the way to do, giving a PRG a datasession at design time just seems silly, IMO.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform