BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to create floating field with a given decimal places?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop)
View previous topic :: View next topic  
Author Message
Johan
Guest





PostPosted: Mon May 24, 2004 10:37 am    Post subject: How to create floating field with a given decimal places? Reply with quote



Hello,

I create a table and add fields with the following codes:

With tblMyTable do
begin
Active:= false;
TableType:= ttDBase;
TableName := 'MyTable';
With FieldDefs do
begin
Clear;
With AddFieldDef do
begin
Name := 'EXPT';
DataType := ftFloat;
end;
...
end; //with FieldDefs
CreateTable;
active:=true;
end;//with tblGenFish

When I open the table in Excel, I always have 4 decimal places and large
collums for the floating fields with redundant spaces. I would like to have
2 decimal places and tight collums. I would be grateful if anyone could show
me how to do so.

Regards,
An


Back to top
Bojidar Alexandrov
Guest





PostPosted: Mon May 24, 2004 11:46 am    Post subject: Re: How to create floating field with a given decimal places Reply with quote



see numeric data type


Back to top
Johan
Guest





PostPosted: Mon May 24, 2004 7:40 pm    Post subject: Re: How to create floating field with a given decimal places Reply with quote



"Bojidar Alexandrov" <bojo (AT) kodar (DOT) net> wrote

Quote:
see numeric data type

Could you tell me more in details? Thank you



Back to top
Hubert Anemaat
Guest





PostPosted: Tue May 25, 2004 10:03 pm    Post subject: Re: How to create floating field with a given decimal places Reply with quote

Hello Johan,

Look at ftBCD.

Hubert Anemaat

"Johan" <ececpig (AT) yahoo (DOT) com> schreef in bericht
news:40b1d047$1 (AT) newsgroups (DOT) borland.com...
Quote:
Hello,

I create a table and add fields with the following codes:

With tblMyTable do
begin
Active:= false;
TableType:= ttDBase;
TableName := 'MyTable';
With FieldDefs do
begin
Clear;
With AddFieldDef do
begin
Name := 'EXPT';
DataType := ftFloat;
end;
...
end; //with FieldDefs
CreateTable;
active:=true;
end;//with tblGenFish

When I open the table in Excel, I always have 4 decimal places and large
collums for the floating fields with redundant spaces. I would like to
have
2 decimal places and tight collums. I would be grateful if anyone could
show
me how to do so.

Regards,
An





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.