setting Float precision in BufDataSet lazarus / 16-Databases ---------------------------------------------------------------------- tatamata · 2009-10-22 16:44 A piece of code: Code: [Select]  //Create and activate BufDataSets   for I:=Low(vSaveTables) to High(vSaveTables) do begin     vSaveTables[I].Active:=False;     //Set precision for Float type     for J:=0 to vSaveTables[I].FieldDefs.Count-1 do begin       if vSaveTables[I].FieldDefs[J].DataType=ftFloat         then begin           vSaveTables[I].FieldDefs[J].Precision:=SdfDatasetOptions.Fie ldByName('FloatPrecision').AsInteger;         end;     end;     vSaveTables[I].MaxIndexesCount:=1000;     vSaveTables[I].CreateDataset;     vSaveTables[I].Active:=True;   end;I hoped I will be able to enable users to define their own float precision, but it seems that number of digits is always variable (default) and that vSaveTables.FieldDefs[J].Precision:=SdfDatasetOptio ns.FieldByName('FloatPrecision').AsInteger;  didn't affect it at all? What is wrong with my code? ---------------------------------------------------------------------- tatamata · 2009-10-22 20:46 What is correlation between DataSet1.FieldDefs[J].Precision and (DataSet1.Fields[J] as TFloatField).DisplayFormat?