Subject | RE: [firebird-support] Re: Key violation on Primary/Unique key constraint INTEG_55/30 on table(s) |
---|---|
Author | Alan McDonald |
Post date | 2006-03-14T11:55:47Z |
> One question:maybe you have another idea...
>
> How do I decrement the value of the Generator (without setting it) if
> I have tried to make a new person, but decided to cancel the idea.
> Therefore, when I press the 'Cancel' button on a form, it will
> decrement the Generator value?
>
> Thanks heaps!
>
> Gaurav
think about this case.....
20 people all working happily on your system
ID=1
user A makes "a new person",
ID=2
then user D makes "a new person",
ID=3
and commits
then user A decides to cancel
ID=2
user C comes along and makes "a new person"
ID=3
and tries to commit - bang - Db screams at you and slaps your face for
trying to make two records with ID=3
Alan