Messages from SQL Server to application

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

in sql server when you do a command like this in a stored procedure

CREATE PROCEDURE [DBO].[APPSP_PrintMessage]
AS
print "Beginning transaction..."
GO

which will print the message to the messages output from SQL Server server
side (which can be seen in query analyzer) how would you retrieve these
status messages as they come back from the stored procedure in the
application? like have a list box showing the messages as the stored
procedure is processed. thanks
 
thanks a lot!

William Ryan eMVP said:
Trap the InfoMessage event
http://www.knowdotnet.com/articles/connections.html . I know the
documentation says it only mentions errors with a severity of 10 (or 12,
it's some very low priority ) or less, but it will send back print messages
too.

HTH,

Bill

--

W.G. Ryan, eMVP

http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
Brian Henry said:
in sql server when you do a command like this in a stored procedure

CREATE PROCEDURE [DBO].[APPSP_PrintMessage]
AS
print "Beginning transaction..."
GO

which will print the message to the messages output from SQL Server server
side (which can be seen in query analyzer) how would you retrieve these
status messages as they come back from the stored procedure in the
application? like have a list box showing the messages as the stored
procedure is processed. thanks
 
Back
Top