In my database, I have NextStatDistanceTime value as a float. When \"float time = reader.GetFloat(0);\" line excecuted, it gives an error of
float time = reader.GetFloat(0);
Probably is precision mismatch between database type and c# type. Try cast like (float)reader.GetDouble(0);
(float)reader.GetDouble(0);