Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Appending problem
Message
De
18/07/2008 14:52:13
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01332359
Message ID:
01332382
Vues:
8
This message has been marked as a message which has helped to the initial question of the thread.
>I want delete records of my emails.dbf, and copy them to a backup table called emails_ex.dbf
>
>In method keypress of column of my grid with belongs to emails.dbf
>
>*************************************************
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
> IF nKeyCode = 7
>SELECT emails
> STORE emails.cod TO esteCOD
>
>SELECT emails_ex
> APPEND FROM emails FOR emails.cod = esteCOD
>
>SELECT emails
> LOCATE FOR emails.cod = esteCOD
> DELETE FOR emails.cod = esteCOD
>
>
> thisform.refresh
> ENDIF
>******************************************************
>
>The problems
>
>It is appending all records from emails.dbf and not only the selected record
>in the grid line
>
>After deleting it does not go to the line I was in, but go to the end of the grid,
>even if I assign: LOCATE FOR emails.cod = esteCOD

Whatever it is your code is extremely redundant. Do it simple:
Select emails
scatter memo name oScatter
insert into email_ex from name oScatter
delete in emails
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform