Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Indexing
Message
De
25/05/2001 15:26:01
 
 
À
25/05/2001 13:21:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00511621
Message ID:
00511685
Vues:
15
Hi Patrick,

Craig's answer *may* have left you with more questions, so I'll try to expand it a bit. . .

When he says "Don't reuse primary keys" you may be saying to yourself that you are not doing so. Even if you think you are not, you most likely are. this is because a DELETE does NOT remove a record from a table. A DELETE only sets the (special) delete marker on, otherwise leaving the record intact.
If you operate with SET DELETED ON then such records never appear so you are led to believe that they have been removed. In fact, though, the records are still there and SET DELETED ON simply checks every record's delete marker and ignores (skips over) those that have the delete marker on. The index(es) remain totally unchanged regardless of the state of the delete marker.

Your application seems to be running with SET DELETED ON and using the first gap of a key value to establish the key for the new (but really second) record. If this is the case then you are, in fact, reusing (deleted) primary keys.

Good luck,

JimN

>Hi All
>
>Everytime if a user delete a invoice,customer code,,,, the data need to be packed. In multiuser environment is quite troublesome...
>Any idea ?
>
>Thanks In advance
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform