title: SQL execution query output to show in a messagebox
body: <p>I have a windows application which executes some sql queries in a database. If we connect to a database and execute manually, we will be getting some message from sql server management studio(SSMS) either it may be success or failure. I want that message to be printed in my application message box. I googled and tried some code like: </p>
  
  <pre><code>string test = ((string)SqlCmd.ExecuteScalar());
  MessageBox.Show(test);
  </code></pre>
  
  <p>But the result which is printed here is something else, which is not expected. I confirmed by executing the same step manually which shown me success message.</p>
  
  <p>Can anyone please help me on this? Any comments would be really appreciated..</p>