Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete from my table
Message
De
31/08/2004 08:43:49
 
 
À
31/08/2004 08:37:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00937956
Message ID:
00937961
Vues:
8
COPY TO move the pointer to the EOF, so DELETE doesn't work. Try this:
FOR i = 1 TO (thisform.text3.Value)  && assume 20 values for flag
   lnTotalNeedingCopy = (thisform.text3.Value * i) - lnTotalCopied
   SEEK i
   COPY TO temp2 NEXT (lnTotalNeedingCopy) WHILE VAL(char18) = i
   lnTotalCopied = lnTotalCopied + _Tally
   SEEK i
   DELETE NEXT (lnTotalNeedingCopy) WHILE VAL(char18) = i
   SELECT home1
   APPEND FROM temp2
   SELECT newamar66
NEXT
HTH

>at this code under i nedd to delete what i choice from mytable(newammar66),
>i'll try to put delete at my code but nothing happend.
>CLOSE all
>SET TALK OFF
>SET ECHO OFF
>SET SAFETY OFF
>thisform.text3.SetFocus
>USE home1 excl
>zap
>SELECT 0
>USE newamar66 EXCL
>INDEX ON VAL(char18) TO hh
>set order to "hh"
>lnTotalCopied = 0
>
>FOR i = 1 TO (thisform.text3.Value)  && assume 20 values for flag
>   lnTotalNeedingCopy = (thisform.text3.Value * i) - lnTotalCopied
>   SEEK i
>   COPY TO temp2 NEXT (lnTotalNeedingCopy) WHILE VAL(char18) = i
>   lnTotalCopied = lnTotalCopied + _Tally
>   SELECT home1
>   APPEND FROM temp2
>   SELECT newamar66
>*delete
>NEXT
>
>thisform.text3.SetFocus
>CLOSE ALL
>use home1 excl
>BROWSE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform