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 

Question on TFMTBCDField...

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





PostPosted: Tue May 08, 2007 8:11 am    Post subject: Question on TFMTBCDField... Reply with quote



Hello,

To get around the ADOExpress limitations when dealing with decimal/numeric
values being converted to a TFloatField or TBCDField I have created a patch
which uses a TFMTBcdField instead. There is one problem. The applicattion
that this will be used with has a SQL Server backend with several tables
containing columns defined as decimal(30, 15). These columns should be able
to hold values with upto 15 digits before and after the decimal point. The
problem I am having is that if I pass a value with more than 14 decimal
places the value is rounded. For example:

99999999999999.999999999999999 is converted to....
100000000000000.000000000000000 when posted to the database.

Does anyone have any recommendations?

On a side note I'm looking at using SDAC, but I'm having problems even
updating a decimal column. Any feedback (good or bad) on SDAC would also be
appreciated. I am including my email address if you would prefer to reply
off group.

Tom
tolson ---at--- metataur ---dot--- com
Back to top
Tom Olson
Guest





PostPosted: Wed May 09, 2007 12:45 am    Post subject: Re: Question on TFMTBCDField... Reply with quote



I found the problem. the OLE VT_DECIMAL type is limited to a precision of
28. That solved the problem.

Tom

"Tom Olson" wrote:
Quote:

To get around the ADOExpress limitations when dealing with decimal/numeric
values being converted to a TFloatField or TBCDField I have created a
patch which uses a TFMTBcdField instead. There is one problem. The
applicattion that this will be used with has a SQL Server backend with
several tables containing columns defined as decimal(30, 15). These
columns should be able to hold values with upto 15 digits before and after
the decimal point. The problem I am having is that if I pass a value with
more than 14 decimal places the value is rounded. For example:

99999999999999.999999999999999 is converted to....
100000000000000.000000000000000 when posted to the database.
...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) 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.