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 6877363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:35:29+00:00 2026-05-27T04:35:29+00:00

Last month we had an issue with a commission payment. The dollar amount exceeded

  • 0

Last month we had an issue with a commission payment. The dollar amount exceeded the actual value an integer could hold. This is the first time it has happened since the App was written.

clist           : tstringlist; 

clist.objects[dex]:= tobject( round((10000*DM.QryComm1.fieldbyname('COSS_NET_CHECK_AMT').asfloat)) + integer(clist.objects[dex]));

the dollar amount was $215,980.72 we multiply by 10000 and get an answer of 2159807200. the max for an integer is 2147483647.

So we increased the integer to an int64.

clist.objects[dex]:= tobject( round((10000*DM.QryComm1.fieldbyname('COSS_NET_CHECK_AMT').asfloat)) + int64(clist.objects[dex]))

The problem that we are having is if a negative integer comes through when we are using int64, a default value of 4294428496 is placed in the tstringlsit and not the actual value. This only happens with negatives. The positive numbers are fine.

We have been researching all over the web and can not find a solution.

Here is the original code…..

while not DM.QryComm1.eof do 
begin 
 . 
 . 
 {Sum net amount for each BVCICI_ID} 
 dex:=clist.indexof(BVCICI_ID); 
 if dex<> -1 then 
  clist.objects[dex]:= tobject( round((10000*DM.QryComm1.fieldbyname('COSS_NET_CHECK_AMT').asfloat)) +   
                       integer(clist.objects[dex])) 
 else 
  clist.addobject(BVCICI_ID, tobject( round(DM.QryComm1.fieldbyname('COSS_NET_CHECK_AMT').asfloat*10000)));
  • 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-05-27T04:35:30+00:00Added an answer on May 27, 2026 at 4:35 am

    Looks like you’re casting a 64 bit integer to a 32 bit pointer, which obviously loses information. It seems like your code is basically Int64(UInt32(some64BitInteger))

    As a workaround you can create a new object that contains an Int64 as field. But of course you’ll need to take care of destroying it or you’ll leak memory.

    A clean solution would be a string->Int64 dictionary, but those are only available in recent versions of delphi.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the last month, we've had a persistent problem with the Python 2.6.x multiprocessing
I don't recall this information being immediately accessible. Last month I read In Google's
I've a real serious issue. I've started developing in Magento just last month, and
A number of times over the last month I've had to replace 'null' fields
I want to get the records of last month based on my database table
I installed Acrobat Reader 9.0 last month, Each time I open a pdf document,
How do you get the last day of the last month in csh? Here
I am just started working as a programmer last month, so there will be
After playing quite a bit of Bad Company 2 over the last month, I'm
I need to get the first and last day of a month in the

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.