Access messages from SQL Statement/Stored Procedure
Hello all,
If I run a SQL statement or execute a stored procedure from SQL Mgmt Studio, I will get two tabs: Results and Messages.
I am lookig to return EXACTLY whats in the messages (the tab I'd see in SQL Mgmt Studio)window to a string variable. Is there a property in ADO.NET (maybe in the command object?)that contains the messages returned from a stored procedure? I am using VB 2008.
Thanks,
Strick
Re: Access messages from SQL Statement/Stored Procedure
If you are talking about the messages that just say like "query executed successfully" or "98 rows returned" or "Syntax error near 'And' " etc then I doubt it as I think that is SQL Management Studio producing those messages rather than the actual SQL database/query. I think you would need to just create your own code that does the same as SQL Management Studio does - i.e. checks the result of the query and displays some string to show that to the end user.