Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 TSQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-09-11 : 07:51:42
sheraz writes "i want some error handeling in stored procedure, as i had tried the @error but it did not meet my requirements..
in SP there is a simple delete query which deletes a record from a table but if any child record found against that record then SP returns some error code in @error also returns the error message of foreign key constrant. i dont want to handel it on front end like in try catch block..
please guide me to handel it at back end.
thanks"

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-09-11 : 08:07:02
You need to construct you delete statement in such a way that it does not violate the foreign key constraint.

Jay White
{0}
Go to Top of Page
   

- Advertisement -