smss

C# SQL output to text like SSMS message tab

為{幸葍}努か 提交于 2019-12-08 02:16:01
问题 I'm having some trouble finding a way to get the results from updates/inserts/deletes/table creates... I would like to get it like you see in the SSMS (SQL Server Management Studio) message tab (guess the tool is done_in_proc). At the moment, I can get the exceptions, and I can capture the prints done in the SQL script. I already tried ExecuteScalar, ExecuteReader, ExecuteWithResults and got nothing. Thanks, Code: public void conn_InfoMessage(object sender, SqlInfoMessageEventArgs e) {

C# SQL output to text like SSMS message tab

穿精又带淫゛_ 提交于 2019-12-06 11:57:15
I'm having some trouble finding a way to get the results from updates/inserts/deletes/table creates... I would like to get it like you see in the SSMS (SQL Server Management Studio) message tab (guess the tool is done_in_proc). At the moment, I can get the exceptions, and I can capture the prints done in the SQL script. I already tried ExecuteScalar, ExecuteReader, ExecuteWithResults and got nothing. Thanks, Code: public void conn_InfoMessage(object sender, SqlInfoMessageEventArgs e) { foreach (SqlError err in e.Errors) { richTextBoxDeployCopy.AppendText("Info : "+err.Message + Environment