Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making a 'grid' table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00102892
Message ID:
00102928
Vues:
26
>>Michelle,
>>
>>You could create a CREATE CURSOR command in a memory variable, then run the memory variable using macro expansion.
>>
>>Something like this:
>>
>>m.lcCommand='CREATE CURSOR MyCursor('
>>FOR i=1 TO lnNumFields
>> m.lcCommand=m.lcCommand+'Field'+LTRIM(STR(i))+'N(6,2)'
>>NEXT i
>>
>>m.lcCommand=m.lcCommand+')'
>>RUN &lcCommand
>>
>>You'd need to fix up the CREATE CURSOR syntax, but this is the general idea.
>
>
>I'm afraid this has me completely baffled. What does this do?
>
>Thanks,

Michelle,

It creates a cursor (you could use CREATE TABLE instead to create a table) with i fields named Field1-Fieldi. You can substitute whatever you want for the field naming. It's really just a way to create a cursor in code when the number of fields and there names aren't known until run-time.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform