CalculatedFields property |
Applies to
TIB_Statement
Declaration
Property CalculatedFields : TIB_StringList;
Description
This property is used to describe the number of and format of the calculated
fields to be used with the statement or dataset.
The format of this property is designed to emulate that of a CREATE TABLE
statement where you put the COLUMN NAME and then the COLUMN TYPE and then the
NOT NULL status of the column. An example might be:
MYINTCOLUMN INTEGER NOT NULL
MYSTRCOLUMN VARCHAR ( 50 )
MYDATECOLUMN DATE
Then, when the statement is prepared these column will be just as though they
were part of the original statement only it is necessary for their values to be
supplied using the OnCalculateFields event.
With the buffered datasets, the results of the calculations are stored in the
buffer along with the rest of the dataset. Because of this they only need to
be calculated once upon being fetched. They will also automatically be
refreshed during other circumstances which could make them become invalid.
It should be entirely feasible to use a Lookup() call to another dataset in
order to maintain a lookup field.
The Contact sample application shows a very simple example of how to use these
properties.