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"}
To determine the proper type, look at the value of
reader["MyField"].GetType()
in the debugger.