>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...
Auto Increment fields (PKs for example) have been requested since VFP 3.0, so it is not an unknown thing.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer