Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete
Message
De
04/08/2008 13:40:47
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Delete
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01336237
Message ID:
01336290
Vues:
13
You do a few mistakes here. Delete all will NOT remove the records! Instead of using a table, create a cursor every time. Something like this:
Create cursor yourcursor 
* Or if you have a table with the correct strucure: Select * from yourmastertable where .f. into cursor yourcursor readwrite
append FROM (txtPathName)  type SDF for !yourfield=headervalue
>SET DELETED ON
>
>txtPathName = "DADOS\ECT\" + "ECT" + CHRTRAN(DTOC(DATE()),"/","") + ".TXT"
>= MESSAGEBOX (txtPathName)
>SET SAFETY OFF
>COPY FILE (anxFullPth) TO (txtPathName)
>SELECT pgreembolso3
>DELETE ALL
>append FROM (txtPathName) type SDF && till here records are appended OK
>set safe on
>SELECT pgreembolso3
>
>Now I need to delete the first record , because its the header
>
>BROW
>GOTO 1
>DELETE
> PACK
>BROW ---- first record still there
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform