Subject Re: Bad design causing problems
Author davidalbiston
Rik

You could look for existing entries in your SP before doing the insert
and throw an exception if the entry already exists. Or you could
create a Unique index on Name so the insert of a duplicate would fail.

Er, in the real world names are duplicated. Are you sure you have a
true model if it rejects duplicates?

Dave

--- In firebird-support@yahoogroups.com, Rik Barker <rik.barker@...>
wrote:
>
> Hi,
>
snip
> So I've got duplicates where no duplicates should be. I figure this is
> because each thread is so isolated from the view of what the others are
> doing that one can add a record for artist "Bob", get a unique ID back,
> then another thread does exactly the same and adds a second Bob.
There's
> no room for 2 Bobs in my database.
>
snip
>
> Cheers,
> Rik
>