Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filter Out the Deleted Record
Message
 
À
22/07/1998 23:58:45
Yin Min Chen
Nec Home Electronics(M) Sdn Bhd
Sungai Petani, Malaisie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00120282
Message ID:
00120311
Vues:
16
>Hi Jess,
> Thank U very much, your solution works. By the way, when I try to key in the deleted record again, the message of 'Uniqueness of Index CODE is violated'. I know that, this is due to the unique index in the table and the deleted record still in the table. What is the best way to make sure the user can key in the deleted record again. I way that I can think of is to pack the table every time we delete the record, will pack process slow down the performance when the table size get big?
>
>Thank U.

Two ways:
1.  SET DELETED OFF 
    Seek the inputted key
    If found 
       RECALL
    ELSE
       REPLACE key to new record
    ENDIF
    SET DELETE ON
2.  If key is numeric, multiply it first by -1 before deleting to make it   unique (good for one deletion only.)
    If key is character, replace it with SYS(2015) before deleting.
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform