%sk% vs %s% in a multi-part key column (AREV Specific)
At 02 MAY 2000 01:22:14PM Dale Walker wrote:
I remember reading on this web page that there are some problems with %sk% in a multi-user environment.
Having used %sk% satisfactorily in a key field that did not have multi-parts, I encountered some problems if it was either part 1 or 2.
The problem that I encountered was that it does NOT increment in this environment.
Is this a known undocumented feature (bug)?
When I use %s% it works fine in a multi-part key. However, even if I don't save the row, it increments. Is this also a known undocumented feature?
Dale
At 02 MAY 2000 02:55PM Eric W. Bachtal wrote:
Dale - can't remember about the first part, an %sk% in a multi-part key, but I know that sk's are incremented even if the record isn't saved because Arev locks and increments the counter when the form is refreshed (i.e., at the start of each new record).
For many years, rather than use Arev's sk's, I've used my own custom routine for auto-incrementing key assignments, choosing to lock and increment on the pre-save to avoid gaps. This also allows me to consolidate my keys in a single table of my choosing (rather than in the dict of the target table), making it possible to LIST the last key of multiple auto-incrementing tables.
Good luck.
ewb