Subject Re: [IBO] excuse the stupid questions but..
Author Marcelo Machado
Thank you really, Daniel
you were very didactic.

Marcelo



Daniel Albuschat <d.albuschat@...> wrote: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
CalculatedFields.
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

Bye,
Daniel
--
eat(this); // delicious suicide


___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !



SPONSORED LINKS
Membership database software Pda database software Database management software Database marketing software Online database software Oracle database software

---------------------------------
YAHOO! GROUPS LINKS


Visit your group "IBObjects" on the web.

To unsubscribe from this group, send an email to:
IBObjects-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


---------------------------------





---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.

[Non-text portions of this message have been removed]