Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pass or return a cursor
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00214987
Message ID:
00215124
Vues:
31
Hi Evan,

How about a custom object with a collection of scatter name objects? See example below.
select Last_Name, First_name from (home() + "SAMPLES\TASTRADE\DATA\employee") into cursor EmpCursor

_screen.AddObject("oCursor","oCursor")

x=1
scan
	dimension _screen.oCursor.aRecord(x)
	scatter name _screen.oCursor.aRecord(x)
	x=x+1		
endscan

use

for each oRecord in _screen.oCursor.aRecord
	? oRecord.Last_Name, oRecord.First_Name
next
return

define class oCursor as custom
	dimension aRecord(1)
enddefine
>>>How do I pass or return a cursor to/from a function or a form? Do I need to convert the cursor to an array?
>>
>>IF it is in the same datasession, there is no problem using the same cursor. You can always pass the cursor name in parameter. You can send the name of the datasession also...
>
>In this case the datasession would be gone by the time the function or form returned. It looks like I am stuck with an array for now. Thanks for your help.
kenweber
GCom2 Solutions
Microsoft Certified Professional

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform