-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Row.GetString(int Ordinal) throws exception when columnType can not be directly cast to string. #406
Comments
Yes, currently MySqlConnector only allows |
I added numeric/string conversion tests here: mysql-net/AdoNetApiTest@3d8dbc6 While MySql.Data does perform implicit conversions to I've decided to deliberately use the more strict behaviour because implicit conversions to |
MySql.Data 8.3.0 now deprecates the implicit conversion to string for non-textual columns:
|
Due to the way MySqlConnector is casting values from GetValue(int) it throws
"Unable to cast object of type 'System.Int64' to type 'System.String'."
when trying to convert a LongLong columnType when calling MySqlConnector.Core.Row.GetString()
Mysql.Data will attempt to convert any row to a string when calling Mysql.Data.DataReader.GetString(int) by calling the final values
.ToString()
method.The text was updated successfully, but these errors were encountered: