In Delphi 5 i would give you this advice; perhaps update the FieldList?!
SQLQuery1.FieldDefs.Clear;
.. add your Field ..
SQLQuery1.FieldDefs.Update;
Am 30.12.2012 15:26, schrieb Krzysztof:
Hi,
I have this code:
f := TField.Create(FDataList);
f.FieldName := 'calc';
f.FieldKind := fkCalculated;
f.SetFieldType(ftBoolean);
f.DataSet := SQLQuery1.FieldDefs.Dataset;
procedure TForm1.OnCalc(DataSet: TDataSet);
begin
SQLQuery1.FieldByName('calc').AsBoolean := true;
end;
But I get error "Invalid type conversion to Boolean in field calc"
Regards
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus