Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7963139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:32:37+00:00 2026-06-04T05:32:37+00:00

We’ve got a table in an Oracle DB defined as: CREATE TABLE AVALUES (

  • 0

We’ve got a table in an Oracle DB defined as:

CREATE TABLE AVALUES
(
  ACODE   VARCHAR2(4) NOT NULL,
  ATYPE   NUMBER NOT NULL,
  ANAME   VARCHAR2(50),
  CREATED DATE DEFAULT SYSDATE
)

Within Delphi we have a query in an ADOQuery component akin to this which returns the value to our application:

with qryComp do
begin
  Close;
  SQL.Text := 
    'SELECT ATYPE FROM AVALUES ORDER BY CREATED';
  Open;
  while not EOF do
  begin
    AddComponents('NAME' + FieldByName('ATYPE').AsString);
    Next;
  end;
  Close;
end;

Deployed on many various client PCs this has worked fine for years, and nothing in our code has changed. On a few client PCs however it’s recently started returning, say, 1.999999999969 instead of 2, which causes the application to crash. We’ve tried looking for the problem but it’s very intermittent – connected via remote desktop to the client computer, we can’t replicate it at all.

Any suggestions for things I can do to investigate this further? As it’s intermittent and only happens on a few computers it’s difficult to debug. I think it might be a problem with the Oracle client, but I’m not sure how we can actually verify that.

Thanks for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:32:38+00:00Added an answer on June 4, 2026 at 5:32 am

    The only thing I can see possible is differences between the FPU control word on client machines causing the precision to be handled differently, because of inherent rounding issues with dealing with floating point types. (See Set8087CW in the Delphi docs; the link is for XE2’s documentation, but there’s no significant change recently that I’m aware of, so they should work.)

    There are four ways to fix it (one not probable, three fairly easy):

    • Change the database column to actually be an integer type instead of a NUMBER

    • Directly ask for an integer value, and convert it yourself

      AddComponent('Name' + IntToStr(FieldByName('ATYPE').AsInteger));

    • Change the code that uses the column, either at the point of use:

      AddComponents(Format('NAME%d', [FieldByName('ATYPE').AsInteger]));

    or in AddComponents itself:

    procedure AddComponents(Prefix: string; Value: Integer);
    begin
      DoWhateverIDo(Prefix + IntToStr(Value));
    end;
    
    // calling code
    AddComponents('Name', FieldByName('ATYPE').AsInteger);
    
    • Explicitly set the value of the 8087CW before working with the database, and set it back when you’re finished. This seems to be the worst option to me; there’s an example of doing this at the documentation link I posted above.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
i got an object with contents of html markup in it, for example: string
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.