Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotSupportedException calling AddWithValue with enum #255

bgrainger opened this issue May 4, 2017 · 1 comment

NotSupportedException calling AddWithValue with enum #255

bgrainger opened this issue May 4, 2017 · 1 comment


Copy link

@bgrainger bgrainger commented May 4, 2017

Calling command.Parameters.AddWithValue("@name", SomeEnum.Value) throws the following exception:

 System.NotSupportedException : Parameter type SomeEnum (DbType: AnsiString) not currently supported. Value: Value
Stack Trace:
   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.MySqlStatementPreparer.ParameterSqlParser.OnNamedParameter(Int32 index, Int32 length)
   at MySql.Data.MySqlClient.MySqlParser.Parse(String sql)
   at MySql.Data.MySqlClient.MySqlStatementPreparer.ParseAndBindParameters()
   at MySql.Data.MySqlClient.CommandExecutors.TextCommandExecutor.<ExecuteReaderAsync>d__3.MoveNext()
@bgrainger bgrainger added the bug label May 4, 2017
@bgrainger bgrainger self-assigned this May 4, 2017
@bgrainger bgrainger added this to the 1.0 milestone May 4, 2017
Copy link
Member Author

@bgrainger bgrainger commented May 11, 2017

Fixed in 0.19.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

No branches or pull requests

1 participant