I have a SP that Prints the results into SQL Server, but I need to use that value in C#.
Changing the PRINT to SELECT is not an option right now. I tried to SqlCommand.ExecuteScalar() but that didn't work.
Does anybody know if it is possible to get the value of PRINT command in SP redirected to C#?
EXAMPLE:
CREATE PROCEDURE doXYZ
AS
BEGIN
PRINT 'XYZ'
END
Now in C# I need to get the value 'XYZ'.... any ideas?