Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append Blank
Message
From
20/07/2006 22:15:28
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01138100
Message ID:
01138285
Views:
10
>In the field validation of the table the default value function is the following:
>
>
>
>ALLTRIM(STR(RECCOUNT()))
reccount()? And what happens when you PACK to get rid of deleted records? You will have duplicate primary keys.

You might lock the table header, go to the last record, get its primary key, and increment it. But I believe it is safer to keep the sequence number in a separate table, as outlined in my previous message.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform