If all the data types were correct you wouldn't get this error message, they are not:
If you look at this line, you explicitly tell the reader to return fields of a given data type:
Transaction Transaction001 = new Transaction(reader.GetInt32(0), reader.GetDateTime(1), reader.GetString(2), reader.GetString(3), reader.GetFloat(4));
Please make sure that field 0 is actually an Int32
, not an Int16
and that field 4 is actually a float
, not a double
or even a decimal
. Decimal types are in most cases the source of errors like that and I bet your problem can be solved by changing from GetFloat
to GetDouble
.