Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Caller Datasession ID
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Caller Datasession ID
Divers
Thread ID:
00590674
Message ID:
00590674
Vues:
65
Hi,

I have a method from where I need to retrieve the Datasession ID from the caller. Please, see the exemple bellow (I have created a simplified example because my real class is far mode complex):
<font color="green">
*-- here we are in one DATASESSION (lets suppose #1) and 
*-- the "loObj" Datasession will be the same</font>
LOCAL loObj = CREATEOBJECT("MyClass")

<font color="green">
*-- here we change the DATASESSION (lets suppose #2) some way. 
*-- The "loObj" datasession continues
*-- to be the same. The call to the "MyMethod" method will automatically 
*-- change the Datasession to #1...</font>
loObj.MyMethod()

DEFINE CLASS MyClass as Custom
   
   <font color="green">
   *-- Inside this method I need to retrieve the DATASESSION ID from
   *-- the caller (1 in this example)</font>
   FUNCTION MyMethod

     LOCAL lnCallerDataSession

     lnCallerDataSession = < some way to retrieve the caller DS ID >
     SET DATASESSION TO (lnCallerDataSession)
     < do what we need >

   ENDFUNC
    
ENDDEFINE
-----
Fabio Vazquez
http://www.fabiovazquez.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform