To redirect the output generated by the T-SQL print statement, use the SqlConnection.InfoMessage event in your C# code. It is called each time print is used inside a stored procedure. The event argument SqlInfoMessageEventArgs.Message contains the output.
Tag: C#
Wrap Methods With Same Frame Functionality
Sometimes one have to write several methods in one class having the same “frame” functionality, e.g. a try/catch block with logging inside the catch. Instead of copying this try/catch block all the times, one can create a wrapper for these methods. The goal is to have the try/catch block only …
Continue reading “Wrap Methods With Same Frame Functionality”