The problem is :

Process 1 generates 11
Process 2 generates 12
Process 3 generates 13
Process 1 issues a rollback - ID 11 is now unused
Process 4 generates 11 - based on rolledback seed value.
Process 5 generates 12 !! Duplicate
Process 6 generates 13 !! Duplicate

Or am I missing something here?  I can't see how to hold a value that is the
basis for the next value (sequential or random) that isn't reset by a
rollback.

The other option of holding a table of all used values works well and is
safe, but we end up with a table of X million rows with an associated index
that does nothing useful.  If this was the selected option I suspect the
best functionality would be to create a random number and then check for
existance.  This at least would avoid the index problems that exist with
sequential keys in some environments.

Stephen


-----Original Message-----
From: Nic Wise [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 11 January 2001 4:52 p.m.
To: Multiple recipients of list delphi
Subject: Re: [DUG]: [DUG-DB]: Unique IDs


> The suggestion that Gary has put forward is exactly what I was thinking
of,
> but I still don't see how to "remember" rolled back ID's.


do you really need to? does 1 2 3 6 7 8 9 10 14 16 17 make a difference, as
long as they are all in order???? whats it for?

N

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to