Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving between datasessions
Message
From
11/01/2008 16:49:58
 
 
To
11/01/2008 14:55:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01281189
Message ID:
01281267
Views:
13
>So............Is there a simple way to copy a cursor from one datasession to another?
>
>You could create an invisible form with a private datasession and use CURSORTOXML to create an XML file that you could pass to the form's INIT() and them use XMLTOCURSOR() to re-constitute the cursor inside the invisible form.

Thanks for this idea.
What I wound up doing is
lnCurSessionId = this.DataSessionId 
LOCAL oTempDS
oTempDS = CREATEOBJECT("session")
SET DATASESSION TO oTempDS.datasessionid
.
.
=CURSORTOXML("myCursor","lcCurData")
otempDS = .null.
SET DATASESSION TO lnCurSessionId
=XMLTOCURSOR(lcCurData,"myCursor")
RETURN "myCursor"    && function is designed to return name of cursor it created
Any suggestions for improvement are welcome

.....Rich
Previous
Reply
Map
View

Click here to load this message in the networking platform