>>>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?
Jay,
You can create cursor from array but since you used afields(), first copy that array's 1-4 columns to another array (otherwise it carries properties from its derived table such as triggers).
Cetin