Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending a cursor as a parameter
Message
From
07/09/2007 16:14:26
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
07/09/2007 16:07:08
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01253120
Message ID:
01253128
Views:
27
This message has been marked as the solution to the initial question of the thread.
>What is the simplest way to send a cursor to a method of an object? I have a class that contains a ProcessData procedure. Once instantiated, can I pass a cursor to it so it can be parsed apart and processed?

If the sender and your processor object live in the same datasession, you can simply pass the alias. If in a different DS, you can pass the set("datasession") as a 2nd parameter, save the current DS inside the procedure, set the datasession to the passed one, process what you have, then restore the DS.

If there aren't too many data, you can pass a XML string instead and have no worries about the DS.

Another alternative is to just pass the SQL needed to create/populate the cursor, and have the processing routine execscript() it.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform