A
ABC
How to retrieve all sql server errors on ADO.NET?
I have a stored procedure which will validate data and raiserrors when any
error value inputted?
Example from my stored procedure when running sample data.
Server: Msg 50000, Level 16, State 1, Procedure proc_Validation, Line 52
Campaign Code must be inputted!
Server: Msg 50000, Level 16, State 1, Procedure proc_Validation, Line 58
Campaign Description must be inputted!
Server: Msg 50000, Level 16, State 1, Procedure proc_Validation, Line 64
Campaign Start Date must be inputted!
Server: Msg 50000, Level 16, State 1, Procedure proc_Validation, Line 70
Campaign End Date must be inputted!
(1 row(s) affected)
But now I write a try .. catch statement to retrieve sqlexception, it only
has one error. What happen?
I have a stored procedure which will validate data and raiserrors when any
error value inputted?
Example from my stored procedure when running sample data.
Server: Msg 50000, Level 16, State 1, Procedure proc_Validation, Line 52
Campaign Code must be inputted!
Server: Msg 50000, Level 16, State 1, Procedure proc_Validation, Line 58
Campaign Description must be inputted!
Server: Msg 50000, Level 16, State 1, Procedure proc_Validation, Line 64
Campaign Start Date must be inputted!
Server: Msg 50000, Level 16, State 1, Procedure proc_Validation, Line 70
Campaign End Date must be inputted!
(1 row(s) affected)
But now I write a try .. catch statement to retrieve sqlexception, it only
has one error. What happen?