Firebird: Saving af real-vaule does change after post? lazarus / 16-Databases ---------------------------------------------------------------------- MoellerCLaus · 2014-12-07 14:15 Dear all Been having this problem for hours now - can not see what is wrong. In my Firebird database I have table kontingent with a field defined as   Add('  girobilagsnummer FLOAT,'); The problem arises after a post. All values have the same number.... I build in a before post and after post see below. Wonder why the value change before and after the post? Any hints? Code: [Select] procedure TKonAktGenForm.ZQueryKontingentAfterPost(DataSet: TDataSet); begin   ShowMessage('After post:' + ZQueryKOntingent.FieldByName('girobilagsnummer').AsString); end; procedure TKonAktGenForm.ZQueryKontingentBeforePost(DataSet: TDataSet); begin   ShowMessage('Before post:' + ZQueryKOntingent.FieldByName('girobilagsnummer').AsString); end; ---------------------------------------------------------------------- MoellerCLaus · 2014-12-07 14:31 Seem to me that something goes wrong in defining fields using ZQuery with datatype float (dynamic SQL). I changed it to             Add('  girobilagsnummer DECIMAL(16,2),'); and it works fine. girobilagsnummer is a 16 digit number (integer). ---------------------------------------------------------------------- mangakissa · 2014-12-08 08:18 Why creating a float/decmal field if the number is an integer. And what if the number begins with a zero (0)? ---------------------------------------------------------------------- MoellerCLaus · 2014-12-13 10:09 I defined it as float because I had more of them and none defined as integer. Believed that if I at some point in time would switch the underlying database; the changes in Dynamic SQL would be less or none. Why should 0 be a problem?