Subject Re: [IBO] excuse the stupid questions but..
Author Daniel Albuschat
2005/11/1, Marcelo Machado <machado6655@...>:
> ... Dear friends...
> ... how to calculate fields using ibo?
> I´m using Firebird.
> Are the calculations made by the application or for the firebird?

There are actually two ways to do this, depending on your needs.
If all the data you need for computation are available in the SQL query you're
executing, you can easily calculate various stuff in the select iself:

select 4+5*a from b

On the other hand, if you need information that is only available on the client
or are doing some more complicated formatting, you can use TIB_Query's
First, you add a line to the CalculatedFields StringList specifying the name and
the type of the `virtual', calculated column:

calculated integer

Then you assign a method to the OnCalculatedField event.
In this event, do something like this:

if( Field.FieldName = 'CALCULATED' ) then
Field.AsInteger := magic_value*30+sunray_intensity

eat(this); // delicious suicide