Board index » delphi » OnCalc error

OnCalc error

I am getting a error with the following statement in the OnCalc method of an
ADODataSet. The debug window opens up. One time I got a 216 runtime error. I
need to set NoUnits equal to NoUnitsCalc if it's greater than zero. Can
someone tell me why this doesn't work? Do pointers not work with if
statements?

if MatADODataSetNoUnitsCalc.AsFloat > 0 then
  MatADODataSetNoUnits.AsFloat:= MatADODataSetNoUnitsCalc.AsFloat;

 

Re:OnCalc error


Quote
>I am getting a error with the following statement in the OnCalc method of an
>ADODataSet. The debug window opens up. One time I got a 216 runtime error. I
>need to set NoUnits equal to NoUnitsCalc if it's greater than zero. Can
>someone tell me why this doesn't work? Do pointers not work with if
>statements?

>if MatADODataSetNoUnitsCalc.AsFloat > 0 then
>  MatADODataSetNoUnits.AsFloat:= MatADODataSetNoUnitsCalc.AsFloat;

I don't see any problem in the code and 216 is just a catch all error that
something in a finalization section of some unit is generating and error.
What is the error message you get when this line of code is executed?
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads