Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary Indexing
Message
From
25/05/2001 15:26:01
 
 
To
25/05/2001 13:21:27
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00511621
Message ID:
00511685
Views:
14
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
Previous
Reply
Map
View

Click here to load this message in the networking platform