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);
Try this
convert.ToSingle(reader["NextStatDistanceTime"])
or do
double value = (double)reader["NextStatDistanceTime"]
Float of sql is equivalent to double of c#, you can see the similar mapping here