Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataSession troubles.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00457954
Message ID:
00457966
Vues:
34
>Here is an outline of the code:
>
>
Function CallMe (part of our standard procedure)
>Parameter tcEmpno
>Local lnDS, lnNewDS, lcCallMe
>
><b>lnDS = set('datasession')
>lnNewDS = createobject('session')
>set datasession to lnNewDS.datasessionid</b>
>
>select 0
>use people order empno
>seek tcEmpno
>if found()
>  lcCallMe=iif(empty(termdate),'','*')+trim(callname)+' '+empname
>else
>  lcCallMe=''
>endif
>
><b>release lnNewDS
>set datasession to (lnDS)</b>
>
>return lcCallMe
In addition to what the others have told you, you should not release the object reference while you are still in the DS of that object. You should release lnNewDS after you change back to the original DS. Otherwise, this could leave a dangling reference and not really close the DS [shown as UNKNOWN if viewed in the Session form].

set datasession to (lnDS)
release lnNewDS
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform