Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why not AutoIncrement PK inside a table?
Message
From
15/07/1999 17:00:19
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Why not AutoIncrement PK inside a table?
Miscellaneous
Thread ID:
00242011
Message ID:
00242011
Views:
46
Right now I use a call to a stored procedure in the DBC
to get the next sequential primary key (PK). The technique
I am using is nearly the same as that used in the TasTrade
app supplied with VFP - nothing fancy.

Why is it that the auto incrementation is not contained
inside the DBF header? The RECCOUNT() value is returned
from and updated in the header. Seems like adding an
additional column (like done with whether a column can
accept .NULL. values) to ID the PK would be fairly easy
to do. Also, an additional 4 bytes of space in the header
can contain the 0 - 2,000,000,000+ values when using
integer keys.

Just curious why this has not been done before. I recall
that trying to add a PK via ASP was not possible. At least
not the way I tried it. Since the integer surrogate PK value
would be totally encapsulated within the DBF header that
problem would go away.

Seems like this would be a nice feature to add to VFP 7...
Next
Reply
Map
View

Click here to load this message in the networking platform