2

I'm running some scripts on a database programmatically. The script produces 'light' errors like so:

RAISERROR (N'[dbo].[TheTableName]: Inserted ACME information: 1.....Done!'
   , 10, 1) WITH NOWAIT;

Redgate-generated scripts seem to generate a lot of these. They're actually helpful with what I'm doing, so I'd like to capture them and show them to the user. But I'm pretty sure they get swallowed up when you run the script via .NET. Is that correct?

1 Answer 1

2

The messages are events on the connection; look at SqlConnection.InfoMessage, or the example here.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.