Hi all,
I'm asp.net developer and i have handling all the sql errors and transactions rollback in my front end coding. But i want to handle this from sql server itself.
My stored procedure is like the below
CREATE PROCEDURE SP_SPTest
-- Add the parameters for the stored procedure here
@Name Varchar(50), @Address Varchar(10)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
INSERT INTO Test (FirstName, Address) VALUES (@Name, @Address)
END
Kindly include TRANSACTION-- ROLLBACk---COMMIT block and RAISE ERROR block in the above SP.
Pls send me soon,