drop proc dbo.P_Product_Name
go
Create proc dbo.P_Product_Name
--P_Product_Name 'Test12'
@Product_Name varchar(100)
as
BEGIN TRY
INSERT INTO T_Table_Test(Product_id, Product_name, today_date)
VALUES(12497, 'Try_Catch',getdate())
END TRY
begin catch
SELECT
ERROR_NUMBER() AS ErrorNumber,
ERROR_SEVERITY() AS ErrorSeverity,
ERROR_STATE() AS ErrorState,
ERROR_PROCEDURE() AS ErrorProcedure,
ERROR_LINE() AS ErrorLine,
ERROR_MESSAGE() AS ErrorMessage;
end catch
Monday, 25 August 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment