My stored procedure:
@UserName nvarchar(64), AS BEGIN SELECT MPU.UserName, SUM(TS.Monday)as Monday //TS.Monday contains float value FROM db
I also had a similar issue and ended up doing this:
if (!oDR.IsDBNull(0)) Rating = (float)oDR.GetSqlDecimal(0).Value;
oDR.GetFloat(0) was returning and invalid cast exception when accessing the result of a SELECT AVG(...).
HTH