Subject | Re: [IBO] TIB_Cursor |
---|---|
Author | Lucas Franzen |
Post date | 2004-02-23T15:33:17Z |
Michael,
procedure TMyForm.MyCursorCalculateField(Sender: TIB_Statement;
ARow: TIB_Row; AField: TIB_Column);
begin
if aField.Fieldname = 'MYFLOAT' then // is it the calcfield?
begin
FieldByName ( 'MYFLOAT' ).AsDouble :=
aRowByName ( 'RADIUS' ).AsDouble * 3.141592654;
// use a Value from a field within the current data row
end;
end;
Luc.
> I have defined a field in CalculatedFields like:as I wrote in my first answer:
>
> MyFloat Numeric(15,2)
>
>
> But how do I assign a value OnCalculateFields ?
procedure TMyForm.MyCursorCalculateField(Sender: TIB_Statement;
ARow: TIB_Row; AField: TIB_Column);
begin
if aField.Fieldname = 'MYFLOAT' then // is it the calcfield?
begin
FieldByName ( 'MYFLOAT' ).AsDouble :=
aRowByName ( 'RADIUS' ).AsDouble * 3.141592654;
// use a Value from a field within the current data row
end;
end;
Luc.