----- Original Message -----
Sent: Thursday, October 17, 2002 9:59
AM
Subject: Re: [DUG]: TAggregateField
Aggreed, design limitation. It would be nice to
be able to have a TAggregateField of a type eg TIntegerField, TStringField,
etc...
The null is returned because TAggregateField is a type Variant not an IntegerField (the
expression - which could be anything is never evaluated!).
There are no records - thus expression of
the Aggregate Field is not evaluated (I think, I considers no records = no
data for evaluation)
I have converted to a Calculated Field, I can
make it an IintegerField.
Regards
Paul McKenzie
Analyst Programmer
SMSS
ltd.
----- Original Message -----
Sent: Thursday, October 17,
2002 9:42 AM
Subject: Re: [DUG]:
TAggregateField
Paul
Interesting, tho I would suggest that
this is not exactly a bug
but definately a design limitation, Since the AggFields belong to the
dataset
not the record, and count(*) should return 0 not NULL on an empty
dataset
Neven
Sent: Thursday, October 17,
2002 8:49 AM
Subject: Re: [DUG]:
TAggregateField
No one replied - but I managed to figure it
out ... for those interested:
In the VCL, if the DataSet is Empty (IsEmpty
= True) the AggregateField is never evaluated - Null is
returned.
TAggregateFields are untyped (variant) unlike
Calculated Fields which are typed.
When thought about - the TAggregateField is a
"Field" belonging to a "Record" - how can one have a field without a
record.
Regards
Paul McKenzie
Analyst Programmer
SMSS
ltd.
----- Original Message -----
Sent: Tuesday, October 15,
2002 11:43 AM
Subject: [DUG]:
TAggregateField
G'Day
I am trying to use a TAggregateField on
a Client App [AppServer accessing IB6] - the RecordCount is 0 but
the TAggregateField with Expression: Count(*) returns a NULL. the field
is actve.
Is this normal - I thought Count(*) should
always return an Integer...
Am I missing something
Regards
Paul McKenzie
Analyst
Programmer
SMSS
Ltd.