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/MySqlConnector/MySql.Data.MySqlClient/MySqlCommand.cs
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,17 @@ public override void Prepare()
85
85
// this is not actually true because "Prepared statement handles are defined to work only with strings that contain a single statement" (http://dev.mysql.com/doc/refman/5.7/en/c-api-multiple-queries.html).
86
86
}
87
87
88
-
publicoverridestringCommandText{get;set;}
88
+
publicoverridestringCommandText
89
+
{
90
+
get=>m_commandText;
91
+
set
92
+
{
93
+
if(m_connection?.HasActiveReader??false)
94
+
thrownewInvalidOperationException("Cannot set MySqlCommand.CommandText when there is an open DataReader for this command; it must be closed first.");
0 commit comments