How to handle an error
how to handle the error using the primary key field in store procedure which is int data type.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Jignesh TrivediRank #16 · 50.3K reputationPosted Apr 2, 2013, 7:48 PM EDT
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.