Is there a way to associate an InfoMessage event with a specific SqlCommand? #3021
Unanswered
Metritutus
asked this question in
Q&A
Replies: 1 comment
-
|
This does seem like an oversight. We will investigate further, and if appropriate, come up with an API proposal. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When receiving information from
PRINTor informationalRAISERRORstatements, there doesn't seem to be a way to tie them back to a specificSqlCommand, as theInfoMessageevent is on theSqlConnection, not theSqlCommand, and theSqlInfoMessageEventArgsinstance doesn't appear to contain any information identifying theSqlCommand.Frustratingly, it does look like the
SqlCommandinstance is passed to theFireInfoMessageEventmethod, so to my layman's eye it seems like the information isn't that far away from the creation of theSqlInfoMessageEventArgsinstance.Anyway, is there any way to identify which
SqlCommanda message came from?Beta Was this translation helpful? Give feedback.
All reactions