Subject Re: [IBO] Caculated field
Author moorefg
Dear Jason,

I have done an upgrade from 4.2fp to 4.2gb and I am returning
an 'Invalid
Variant Operator' against the following code:-

There is a calculated field 'Current Balance' and I declare Balance
as a
form variable Balance : double;

procedure TAccount_ReconciliationForm1.IB_Query1CalculateField(
Sender: TIB_Statement; ARow: TIB_Row; AField: TIB_Column);
begin
Balance := Balance + ARow.GetColumnValue('amount');
ARow.SetColumnValue('Current_Balance', Balance) ;
end;

Works fine under 4.2fp and records error under 4.2gb.

I have two separate machines with the different configurations
accessing the
same code base and data so there are no variables there other than the
different versions of IB_Objects.

Also I have as separate error with another calculated field being
generated
in Procedure
TIB_Statement.DoCalculatedField(................................

if Assigned(OnCalculateField) then
OnCalculateField(Self, ARow, AField)

Neither error emerges on exactly the same code and data in 4.2fp.

On Runtime I also get an 'Integer Overflow' error. Since the
reference fields are integers and not large in the 99999 range I
think this is a further manifestation of the same problem.

Error generated from IB_Utils

if ( AVal > High(integer) ) or ( AVal < Low(integer) ) then
raise Exception.Create( E_IntegerOverflow );
Result := Trunc( AVal );

I've not really shed much light on the issue but I hope that this
helps.

Kind regards,

Francis Moore



--- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> I wasn't able to get to it yesterday. Sorry. I still have not found
out if
> it is an IBO bug or not.
> I'll let you know as soon as I can. Is it possible for you to work
around it
> somehow for the time being?
> Is anyone else noticing this?
>
> Thanks,
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
>
> ----- Original Message -----
> From: "Vincent Bergeron" <info@v...>
> Newsgroups: egroups.ibobjects
> To: <IBObjects@y...>
> Sent: Friday, March 22, 2002 11:51 AM
> Subject: Re: [IBO] Caculated field
>
>
> > Hi Mr. Wharton.
> >
> > > Send the sample please.
> > >
> > > Jason Wharton
> > > CPS - Mesa AZ
> > > http://www.ibobjects.com
> >
> > Does the error occurs on your side too?
> >
> > I just want a little follow-up to know if it's a IBO bug or.. a
Vincent
> bug!
> > ;-)
> >
> > Thanks
> >
> > VB
> >