SqlCommand and Print statements

  • Thread starter Thread starter escher4096
  • Start date Start date
E

escher4096

I have a block of SQL that has print statements in it. When I execute
it with Query Analyzer the output from the print commands goes to the
messages pane. Is there any way to get those messages when I execute
the same SQL through a SQLCommand in C#?

Thanks

-Cam
 
Cam,

Look at the InfoMessage event on the SqlConnection class. It will give
you what you need, I believe.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top