I'm retrieving some data with a SqlDataReader
and trying to convert one of these objects to a float (the same as its data type in the database).
What I have:
u.unitid = (float)Convert.ToSingle((reader["UNITID"]));
This returns a "0" for every unitid.