Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append Blank
Message
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:
01138270
Views:
10
You have to FLOCK() table in order to prevent duplicates. I would recomend to abandon it altogether and use method recomended by Craig Berntson in http://www.craigberntson.com/Articles/kb006.htm

>In the field validation of the table the default value function is the following:
>
>
>
>ALLTRIM(STR(RECCOUNT()))
>
>
>
>Is there any way two users could get the same value from this for their record?
>What if these two users run code to add a record at the same time?
>
>User1:
> SELECT Table_with_default_value_for_primary_field && has 99 records
> APPEND BLANK && 100th record.
>
>User2:
> SELECT Table_with_default_value_for_primary_field && has 99 or 100 records?
> APPEND BLANK && 100th or 101st record?
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform