Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending a cursor as a parameter
Message
De
07/09/2007 16:14:26
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
07/09/2007 16:07:08
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01253120
Message ID:
01253128
Vues:
26
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform