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
const string query = "select Col1 from Table1 where @parameter is null OR Col2 = @parameter";
using (var cmd = new MySqlCommand(query, con))
{
cmd.Parameters.Add(new MySqlParameter() { ParameterName = "@parameter", Value = null });
await cmd.ExecuteNonQueryAsync(cancellationToken);
}
Stack Trace:
at System.Object.GetType()
at MySql.Data.MySqlClient.MySqlParameter.AppendSqlString(BinaryWriter writer, StatementPreparerOptions options)
at MySql.Data.MySqlClient.MySqlStatementPreparer.ParameterSqlParser.DoAppendParameter(Int32 parameterIndex, Int32 textIndex, Int32 textLength)
at MySql.Data.MySqlClient.MySqlParser.Parse(String sql)
at MySql.Data.MySqlClient.MySqlStatementPreparer.ParseAndBindParameters()
at MySql.Data.MySqlClient.MySqlCommand.<ExecuteReaderAsync>d__50.MoveNext()
The text was updated successfully, but these errors were encountered:
To reproduce :
Stack Trace:
The text was updated successfully, but these errors were encountered: