Subject Re: Bad design causing problems
Author davidalbiston

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?


--- In, Rik Barker <rik.barker@...>
> Hi,
> 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.
> no room for 2 Bobs in my database.
> Cheers,
> Rik