I'm using an old Paradox database along with an older Delphi program I inherited and it keeps giving me a Number is out of range error when I hit this statement:
POE_Data.OrdersTaxRate.AsFloat:= StrToFloat(Copy(TaxRateLabel.Caption, 1,1));
The TaxRateLabel.Caption
equals 7%, and so the StrToFloat
is passing just the 7 character. The TaxRate field is defined in the database as a BCD field with 2 decimal places. I don't see any minimum or maximum values set in the database, so why is this producing the number out of range error?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…