Board index » delphi » field with size and place decimal in a table DBF

field with size and place decimal in a table DBF

Ol pessoal!!!

When I try to create a table DBF defining a field as ftSmallInt it creates a
field size 20 with 4 place decimals
How I do to create fields size 3 no place decimal
and field size 16 with 2 place decimal?

If I define a field type ftSmallInt size 16 appears a bug when I execute
Table.CreateTable
If I no define size (size=0), all right. WHY

TIA
--
Elias de Conti
edco...@brturbo.com
UNISYSTEM INFORMTICA
unisys...@brturbo.com

 

Re:field with size and place decimal in a table DBF


Quote
>How I do to create fields size 3 no place decimal
>and field size 16 with 2 place decimal?

 with Table1.FieldDefs do
  begin
    Clear;
    Add('NumField1', ftBCD, 0, False);
    Items[Count - 1].Precision := 3;
    Add('NumField2', ftBCD, 2, False);
    Items[Count - 1].Precision := 116;
  end;
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:field with size and place decimal in a table DBF


thank you

"Brian Bushay TeamB" <BBus...@Nmpls.com> escreveu na mensagem
news:4j0rcvoc5g9ousl94h6d2dv304cqqeg1cp@4ax.com...

Quote

> >How I do to create fields size 3 no place decimal
> >and field size 16 with 2 place decimal?

>  with Table1.FieldDefs do
>   begin
>     Clear;
>     Add('NumField1', ftBCD, 0, False);
>     Items[Count - 1].Precision := 3;
>     Add('NumField2', ftBCD, 2, False);
>     Items[Count - 1].Precision := 116;
>   end;
> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Other Threads