how to handle an error
how to handle the error using the primary key field in store procedure which is int data type.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Apr 2, 2013, 11:48 PM
hi,
Try ... Catch may help you to handle exception in SQL Server Stored procedure
BEGIN TRY
// SQL Statements
END TRY
BEGIN CATCH
//Handle the exception details
END CATCH
i think SQL cannot handle more specific error like FK violation or PK violation
hope this will help you.