Subject | Re: Bad design causing problems |
---|---|
Author | davidalbiston |
Post date | 2006-05-24T16:02:45Z |
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:
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:
>snip
> Hi,
>
> So I've got duplicates where no duplicates should be. I figure this isThere's
> 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.snip
>
>
> Cheers,
> Rik
>