Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create a cursor with predefined structure
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00562758
Message ID:
00562762
Vues:
14
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>Say, I have a table with 60 or more fields. I want to create a cursor with the same structure. Is there a native VFP command, which would allow me to do that? I could not find it in Help. Of course, I have a workaround like building CREATE CURSOR statement on the fly using afields() and iterating through all fields, but it seems to be an overkill...
>
>Thanks a lot in advance.

In VFP 7:

select * from mytable where 1 = 0 into cursor mycursor readwrite

IN VFP 6:
select * from mytable where 1 = 0 into cursor c_temp nofilter
use dbf('c_temp') again alias mycursor in 0
select mycursor
use in c_temp

This gives you the structure with indexes.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform