So in C# whenever I retrieved a tinyint from my MSSQL database I used the following cast.
(int)(byte)reader["MyField"];
However, that cast doesn't seem to work in MySQL.
What I have tried
(byte)reader["MyField"];
and just
(int)reader["MyField"];
Edit 1
Exception
The specified cast is not valid.
Edit 2
This is the data type.
{Name = "SByte" FullName = "System.SByte"}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With