Page 1 of 1

FieldDefs InternalCalcField

Posted: Thu 07 Oct 2010 07:45
by christio
Hi,

How can I check if a field in a dataset (TIBCQuery) is a computed field?

CREATE TABLE RENNEN (
ID BIGINT NOT NULL,
SKILEHRER BIGINT,
COALESCED_SKILEHRER COMPUTED BY (coalesce(skilehrer, 0))
);


Neither Fields.ReadOnly nor FieldDefs.InternalCalcField returns true for the field "COALESCED_SKILEHRER". The dataset is filled with an SELECT statement.

Regards, ch.

Posted: Thu 07 Oct 2010 12:25
by AndreyZ
Hello,

You cannot check that the field is computed by database. The fkCalculated and fkInternalCalc field types are used only for Delphi calculated fields. For database computed fields the field type is fkData.

Posted: Thu 07 Oct 2010 12:50
by christio
With the IBX components the Fields.ReadOnly property was set to True if a field was computed by the database.

Posted: Fri 08 Oct 2010 14:31
by AndreyZ
IBDAC doesn't support this functionality. We will investigate the possibility of adding this functionality in the future. As soon as we solve this question we will let you know.

Posted: Mon 11 Oct 2010 08:58
by christio
Ok, thank you.

Posted: Fri 29 Oct 2010 09:49
by Dimon
To solve the problem set the TIBCQuery.Options.DefaultValues property to True.