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
exception=newInvalidOperationException("CommandText must be specified");
159
159
elseif(Connection?.HasActiveReader??false)
160
-
exception=newInvalidOperationException("Cannot call Prepare when there is an open DataReader for this command; it must be closed first.");
160
+
exception=newInvalidOperationException("Cannot call Prepare when there is an open DataReader for this command's connection; it must be closed first.");
161
161
162
162
if(exceptionis not null||Connection!.IgnorePrepare)
163
163
returnfalse;
@@ -179,7 +179,7 @@ public override string CommandText
179
179
get=>m_commandText;
180
180
set
181
181
{
182
-
if(m_connection?.HasActiveReader??false)
182
+
if(m_connection?.ActiveCommandId==m_commandId)
183
183
thrownewInvalidOperationException("Cannot set MySqlCommand.CommandText when there is an open DataReader for this command; it must be closed first.");
184
184
m_commandText=value??"";
185
185
}
@@ -194,7 +194,7 @@ public override string CommandText
194
194
get=>m_connection;
195
195
set
196
196
{
197
-
if(m_connection?.HasActiveReader??false)
197
+
if(m_connection?.ActiveCommandId==m_commandId)
198
198
thrownewInvalidOperationException("Cannot set MySqlCommand.Connection when there is an open DataReader for this command; it must be closed first.");
0 commit comments