C# MySQL Question
C#
21
Posts
13
Posters
1
Views
1
Watching
-
The reader returns type
object
, and it must be cast to the necessary type for use in function calls. For the TinyInt type, I forget exactly what you need to cast it to but you can tryshort
. Try this:int newNumber = (int)(short)reader["someField"];
The difficult we do right away... ...the impossible takes slightly longer.