adding calculated fields in runtime for TIBQuery or TIBDataSet

Hello All

I have the trouble. Possible I'm beginner :-)

I try add the new calculated field into IBQuery but
it is unvisible in TDBGrid.

Is this code rightly ?

with IBQuery1 do begin
    Close;
    SQL.Text:='SELECT * FROM MYTABLE';
    Open;
    NewField:=TField.Create(Nil);
    NewField.SetFieldType(ftInteger);
    NewField.FieldName:='NewField';
    NewField.Calculated:=True;
    NewField.FieldKind:=fkCalculated;
    NewField.DataSet:=IBQuery1;
    Open;
end;

After this I always have exception
"IBQuery1:Field 'NewField' cannot be a calculated or lookup field"

How I can to do it ?

Roman
n...@chat.ru