[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2622
  • Last Modified:

Delphi/InterBase/Firebird problem

I'm using a Domain to define money fields in tables as follows:

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.
  • 2
1 Solution
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.


GStarlingAuthor Commented:
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.
it was a pleasure to help you


Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now