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);
My guess is that Database is returning double value, try getting it as Double and convert it float (if required).
Double
float
float time= (float) reader.GetDouble(0);