Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loop through a cursor structure and gain knowledge
Message
From
28/04/2006 18:08:21
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
28/04/2006 17:57:58
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01117699
Message ID:
01117706
Views:
21
>>Want something like GetCursorProp for cursors. I know, but it only works on views. As much as I can tell anyway. I need to loop through the cursor structure and capture things like the field names, size, type, etc. Do I have to put this into an array first?
>
>Ok, maybe AFIELDS is what I want to use, but how can I recreate the cursor in a non-clunky way from the array?

Now I've got this:
m.FieldCount = AFIELDS(aCursorProperties,'AcctValTest')

FOR i = 1 TO m.FieldCount
	? 'Name: ' + aCursorProperties(i,1)
	? 'Type: ' + aCursorProperties(i,2)
	? 'Width: ' + ALLTRIM(STR(aCursorProperties(i,3)))
	? 'Decimals: ' + ALLTRIM(STR(aCursorProperties(i,4)))
ENDFOR
Which is nice, but it seems like the next step is going to involve a lot of concantenation and parsing. Is there a better way?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform