Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COPY TO .... up to current record?
Message
De
11/03/2005 08:34:11
 
 
À
11/03/2005 04:25:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Divers
Thread ID:
00994688
Message ID:
00994778
Vues:
25
Tore --

Unfortunately, neither of your suggestions are usable. The first fails because the table is ordered, so the record numbers appear to be random. The second fails for the same reason as well as because the table is filtered.

Jim

>
>lnRecno = RECNO()
>GO TOP
>COPY TO ... WHILE RECNO() <= lnRecno
>
>But I always prefer SQL
>lnRecno = RECNO()
>SELECT * FROM ALIAS() TO ... WHERE RECNO() <= lnRecno
>
>>That's so close -- it just doesn't get the current record. However, putting a SKIP before assigning lnRecno is all that's needed to complete it.
>>
>>Thanks,
>>
>>Jim
>>
>>
>>>Try
lnRecno = RECNO()
>>>GO TOP
>>>COPY TO ... WHILE RECNO() <> lnRecno
>>>
>>>
>>>>How do I go about copying the current table using
COPY TO
to copy all records from the start of the file to the current record?
>>>>
>>>>Background:
>>>>Current table may be a cursor or free table. As this need occurs in a general routine, I have no other information about the table (no unique keys, etc). I can't use SELECT, as there is most likely a FILTER on the table; the table is sorted as well.
>>>>
Jim Nelson
Newbury Park, CA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform