Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loop through a cursor structure and gain knowledge
Message
De
28/04/2006 18:08:21
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
28/04/2006 17:57:58
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01117699
Message ID:
01117706
Vues:
19
>>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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform