Results 1 to 2 of 2

Thread: Access messages from SQL Statement/Stored Procedure

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2004
    Posts
    541

    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

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    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.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width