Subject Re: [firebird-support] Is using SELECT COUNT (*) in a stored procedure a bad idea? (Once Again)
Author Martijn Tonies
> Q: Is there any way to re-write this stored procedure to quit processing
> table after it finds the first occurrence where the ACTIVITY_TYPE_CODE =
> 'N'?
> Q: Is there a better way to trap for FK violations in my interface and not
> use stored procedures at all?

Actually, I simply do a:

.. do delete
on E:Exception
do if Pos('FK_<myforeignkeyname>', E.Message) > 0
then ... show message for this particular foreign key and rollback

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Upscene Productions