Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp50 - Auto Numbering
Message
From
21/04/1997 10:54:24
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, United States
 
 
To
21/04/1997 10:20:30
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00029060
Message ID:
00029074
Views:
35
> Matt, your method will surely work. The only problem is exclusive opening > especially if it's part of dbc. RLOCK() will provide uniqueness the same > way and with less overhead. > > > >-- Ed, your're absolutely correct. My only concern is that I've heard that on busy networks, RLOCK() doesn't always handle the buffer properly. It sometimes flushes the buffer AFTER the record is unlocked, thereby allowing the potential for two users to grab the same id before either increments it. If the setup table is a single records and is required to be opened exclusively for small/quick reference transactions and then closed, the overhead can be reduced toa minimum. BEGIN..END TRANSACTION also allows the use of ROLLBACK, so if the transaction is cancelled, the counter can be reset. In the end, i think ot all depends on what you're planning to do with it. Either way works. Matt
Matt McDonnell
...building a better mousetrap with moldy cheese...
Previous
Reply
Map
View

Click here to load this message in the networking platform