Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Supress SQL Errors
Message
From
28/04/2001 11:08:55
 
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00500132
Message ID:
00501237
Views:
24
That's what I was afraid of. In this table, there are so many relations that it would be very difficult to check all of them. I'll just have to deal with it from my calling code.

>I don't believe that there is anyway to prevent SQL Server from raising the error. Your option is probably to test to see if the delete would cause a problem. This, of course, requires that you embed the relationships within your stored procedure:
>
>IF NOT EXIST(SELECT * FROM books WHERE au_id = @author)
>BEGIN
> DELETE FROM authors WHERE au_id = @author
>END
>
>-Mike
Thanks,
Dan Jurden
djurden@outlook.com
Previous
Reply
Map
View

Click here to load this message in the networking platform