Anderson Soffa
2008-02-05 21:43:09 UTC
I need some help, I want to add a calculated field to a TIBClientDataSet at
runtime, and sets its command text at runtime too.
I tried to figure it out, I add the calculated field by doing this:
Field := TStringField.Create(self);
with Field do
begin
FieldName := 'Description2';
Calculated := True;
DataSet := MyDataSet;
end;
And set the commandtext with the SQL, after the open, the fields property of
the dataset only have the calculated field, the other fields appears on the
FieldDefs property, so I can't get access to them by doing FieldByName or
using the dataset['field'] operator.
What I doing wrong?
Thanks very much
runtime, and sets its command text at runtime too.
I tried to figure it out, I add the calculated field by doing this:
Field := TStringField.Create(self);
with Field do
begin
FieldName := 'Description2';
Calculated := True;
DataSet := MyDataSet;
end;
And set the commandtext with the SQL, after the open, the fields property of
the dataset only have the calculated field, the other fields appears on the
FieldDefs property, so I can't get access to them by doing FieldByName or
using the dataset['field'] operator.
What I doing wrong?
Thanks very much