Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Caller Datasession ID
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Caller Datasession ID
Miscellaneous
Thread ID:
00590674
Message ID:
00590674
Views:
63
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
Next
Reply
Map
View

Click here to load this message in the networking platform