You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlClientDiagnosticListenerExtensions.cs
+155Lines changed: 155 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -346,5 +346,160 @@ public static void WriteTransactionRollbackError(this SqlDiagnosticListener @thi
using(TryEventScope.Create("SqlCommand.ExecuteScalar | API | ObjectId {0}",ObjectID))
1092
1087
{
1088
+
SqlStatisticsstatistics=null;
1089
+
boolsuccess=false;
1090
+
int?sqlExceptionNumber=null;
1093
1091
SqlClientEventSource.Log.TryCorrelationTraceEvent("SqlCommand.ExecuteScalar | API | Correlation | Object Id {0}, Activity Id {1}, Client Connection Id {2}, Command Text '{3}'",ObjectID,ActivityCorrelator.Current,Connection?.ClientConnectionId,CommandText);
using(TryEventScope.Create("SqlCommand.ExecuteNonQuery | API | Object Id {0}",ObjectID))
1184
1167
{
1168
+
SqlStatisticsstatistics=null;
1169
+
boolsuccess=false;
1170
+
int?sqlExceptionNumber=null;
1185
1171
SqlClientEventSource.Log.TryCorrelationTraceEvent("SqlCommand.ExecuteNonQuery | API | Correlation | Object Id {0}, ActivityID {1}, Client Connection Id {2}, Command Text {3}",ObjectID,ActivityCorrelator.Current,Connection?.ClientConnectionId,CommandText);
1186
1172
1187
1173
try
@@ -1196,24 +1182,22 @@ public override int ExecuteNonQuery()
using(TryEventScope.Create("SqlCommand.ExecuteXmlReader | API | Object Id {0}",ObjectID))
1690
1669
{
1670
+
SqlStatisticsstatistics=null;
1671
+
boolsuccess=false;
1672
+
int?sqlExceptionNumber=null;
1691
1673
SqlClientEventSource.Log.TryCorrelationTraceEvent("SqlCommand.ExecuteXmlReader | API | Correlation | Object Id {0}, Activity Id {1}, Client Connection Id {2}, Command Text '{3}'",ObjectID,ActivityCorrelator.Current,Connection?.ClientConnectionId,CommandText);
0 commit comments