?
Solved

Delphi/InterBase/Firebird problem

Posted on 2003-03-25
3
Medium Priority
?
2,601 Views
Last Modified: 2013-12-09
I'm using a Domain to define money fields in tables as follows:
     CREATE DOMAIN "MONEY" AS NUMERIC(15, 2);

The large number of digits are needed to track corporate total yearly sales, etc. When I use IB 6 with SQL Dialect 3 using ZEOS controls (also set to SQL Dialect 3), I get (Overflow) displayed in these fields in either DBEdit or DBGrid controls.

What is my best alternative?  I'm doing this project on literally no budget until a company buys it, so I prefer not to use purchased drivers or upgrade from Delphi 4 Professional right now.  Are NUMERIC fields what you use for currency?

Thanks in advance.
0
Comment
Question by:GStarling
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
kacor earned 225 total points
ID: 8325104
Hi GStarling,

I try to support you. In the IB6 Data Definition Guide are the followings:
"
DECIMAL (precision, scale) Variable (16, 32, or 64 bits) - Number with a decimal point scale digits from the right
• precision = 1 to 18; specifies at least precision digits of precision to store
• scale = 0 to 18; specifies number of decimal places must be less than or equal to precision
 
• Example: DECIMAL(10, 3) holds numbers accurately in the following format: ppppppp.sss

DOUBLE PRECISION 64 bits   2.225 x 10 –308 to 1.797 x 10 308 IEEE double precision: 15 digits (rem: Actual size of DOUBLE is platform-dependent. Most platforms support the 64-bit size.)
"

Try to use the decimal type number.

wbr

Janos
0
 
LVL 1

Author Comment

by:GStarling
ID: 9259435
Thanks for the info.  I appologize for not answering sooner, but something happened so that when I went back to answer this, I couldn't find where I had posted the origianl question.

Your answer was helpful, however.  Thank you.  I have experiemented with DECIMAL(15,2) and NUMERIC(15,2) fields.  I have now switched to decimal fields, but the IB samples were all NUMERIC(10,2) for the examples in the sample database that contained currency and that was what I was doing when I wrote the question.
0
 
LVL 10

Expert Comment

by:kacor
ID: 9260834
it was a pleasure to help you

Janos
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
In this article, we’ll look at how to deploy ProxySQL.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question