Hi, I have a question, I have a stored procedure in sqlserver the return 2 variables, in this stored procedure I try catched error, so for the C# this procedure never exit with error.
I can use
ERROR_NUMBER(),ERROR_SEVERITY(), ERROR_STATE(),ERROR_PROCEDURE(), ERROR_LINE(), ERROR_MESSAGE();
but I don't know if I have same errors, so I don't know what is the best way manage this situation...
A little improve: I know exactly how to catch error in t-sql and in C#, the problem is how to pass all the information that I catch in sql through C#, for example, without error the SP return 2 columns, but with error it return for example 5 columns, and I don't know a priori