Updated on Kisan Patel
This tutorial will show you how to get more details about an error occurred in SQL Server?
To get more error related values in the CATCH
block, try to use error methods, used in the SELECT
statement inside the BEGIN CATCH
block.
BEGIN TRY SELECT 'csharpcode'/0 END TRY BEGIN CATCH SELECT ERROR_MESSAGE(), ERROR_NUMBER(), ERROR_PROCEDURE(), ERROR_SEVERITY(), ERROR_STATE(), ERROR_LINE(); END CATCH