Subject Re[3]: [firebird-support] Bad design causing problems
Author Rik Barker
Hi Pavel,

You beat me to it. I was just about to post a big thank you to you and
Adam. Everything is working perfectly now I'm using Read Committed
transaction level not Snapshot.

>I use WHEN...DO quite rarely myself, so I can't point you. But it
>seems strange that WHEN ANY DO doesn't work.

It was working correctly. It was me stupdily using the wrong transaction
level that was causing the failure, but I hadn't realised and so was
looking elsewhere.

>I see now. Then you may get it all just with the SP:

<snip SP>

Thankyou for that. I was just thinking I could do a select if the insert
failed to speed things along.

Is it considered good behaviour to attempt an insert without first
performing a select? I can see that the constraint stops me getting
duplicates, but I thought there would have been a penalty for attempting to
Insert without first checking.

Many thanks to both you and Adam for your patient replies. If you were
planets, I'd orbit you. *8)