Karen,
Create a tracking table.  In your form, on exit from the autonumbered field, capture the number and maybe the user name, datetime, etc.
Then you can match this table with your table to print some statistics about missing numbers and see if the guilty party does this consistently.  At least you can account for it.
 
Bernie Lis
----- Original Message -----
Sent: Tuesday, July 15, 2003 10:35 AM
Subject: [RBASE-L] - Re: [RBASE-L] An autonumber trigger?


Sorry, Bernie, yes that's what I mean.  A skipped autonumber when someone
decides not to add a row.  I'm not sure your method would work in a
multi-user environment because the person could get the form on the screen
with the correct autonumber, be sitting on the empty form at the same time
that someone else does the same thing.  If that first person then decides
not to add the row, but the second person does, then that first number will
still be lost.

What's a missing autonumber.  If the field is autonumbered it should always get a number.  Could it be that it appears numbers are skipped?
That could happen if someone enters a row, then deletes it.
If this is the case and you don't want any skipped numbers you could re-autonum before each entry.
sel max(col_name) into maxno from table
autonum col_name in table using (maxno+1) 1 nonum
 
Bernie Lis


David:  That's what I was thinking.  That I could autonumber the column
to start with 9999999 and then have the trigger calculate the max number
that's less than 999999, add one to it, then update the table and set
a variable to the number.  Couldn't use the '0' for an autonumber because
it would start incrementing it and you would eventually get a used number
even if you don't start with single digit ids.

Dennis:  Your comments are also relevant.  Do you think the idea above
would work?



>Could you autoassign the value 0 or a very high number like 999999999 and then use your after trigger to update the row?
>
David


Karen

Reply via email to