Vladislav wrote:
My customers have reported strange behaviour of the locally used modules
for running the register on stroke patients, specifically, adding new
patient to the register. When analising a sample, I have found that an
autonumber variable (id) doesn't behave as expected. At some instant
after the record with id=180, the next record is coming with id=158.
I can't find any reasonable explanation. Could anybody?
V.M.
I did a recent search of the newsgroup on google for some information on
alternatives to sequences other than using autonumber. There are some
circumstances when autonumber will start generating numbers randomly.
Replication, is one instance, I seem to recall.
As long as your application does not depend upon the autonumber for
ordering records, you're fine. If you need an ascending sequence
number, I'd be curious as to what others might suggest.
I normally develop with Oracle in which sequences can be created and
associated with a table via a "trigger" on or after inserting a record.
The nice thing about this is that you can set at any time how the
sequence advances, ie, by 1, or by any number (2, 4, 10, 1000, etc, etc,
even reverse order with negative numbers).
However, in my situation I mentioned at the first para above, I was
desperate for some kind of in order sequence number for records in a Jet
application and didn't want to rely on date() or now() as these depend
upon the user's clock setting, which could potentially be screwed up.
Autonumber was the other alternative, so I did the above mentioned
search to make sure it was OK. Apparantly it is not.
What I ended up doing was relying on a default value for a form text box
control for the sequence number or a function which used the domain max
function +1
dmax("FieldName ", "TableName" ) +1
for the next number in sequence. This was for a single user application
(ie, not multiple front ends). I'm not sure how this would work with
multiple front end users. I would assume OK.
--
Tim
http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me