Hi Phil,
Create a AutoNo Table and PoolNo Table.
Generate the AutoNo from the AutoNo each time adding 1 to the existing.
In cases where you press insert and decided to cancel, save the number into
the PoolNo. The next time, before you generate a number from the AutoNo
Table, loop through the PoolNo to make sure that similar number are being
recycled. I had been using this in a 34 users enviornment without any
problem.
In such case that they delete a record, you can base on a global variable to
decide whether you want to throw the number back to the PoolNo table to be
cycled.
Thanks.
Kelvin Chua
SINGAPORE
Quote:
> I have several files in my dictionary whose primary key is an auto-
> incrementing LONG RecordNo. My question is when I am creating a new
> record in embedded code, how do I increment the RecordNo (or reuse a
> deleted one)? I could always SET to the end of the file and GET previous
> and add 1 to that RecordNo but that seems crude, inefficient and possibly
> fraught in a multi-user situation. Must be a better way. TIA.
> Phil Lancaster