Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What should the primary key be?
Message
From
03/02/1999 08:48:36
 
 
To
03/02/1999 01:45:12
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00182646
Message ID:
00183359
Views:
24
>Sure. VFP has no means of internally managing incremental keys, so it rests on the developer to provide them.

I am painfully aware of this, this is one of the things I could not believe when I first started using VFP- where is the autokey field type?

>I have seen time and time again that this can be a problem ----

I haven't seen it yet. I have an app in production that during certain times of the year has about 20 data-entry people pounding on the same screen in intensive DE. This screen automatically adds records to a table at a rate of about 1/ second. And it occasionally runs along side routines that batch add thousands of records in a relatively tight loop. I have yet to have a problem with the de facto scheme used to generate keys (integer stored in an external table). Since VFP locks the table header during an insert, and the developer can explicitly lock the pk table while incrementing the key, and can have the routine ait while another person is using it, this all works out very well for me.

I won't conject on how much trouble other people have had with internal buffering or anything else that might this a bad plan, only testify tht it works beautifully for me.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform