- Matt Kluzak
- PowerBuilder
- Thursday, 26 August 2021 02:50 PM UTC
Hello,
I have an application that looks at a Sybase ASE 15.7 database with fields of Numeric(18,0). All values in the database are whole numbers. I recently noticed that in one datawindow the field would display properly as 1002000000002399, but after it was assigned to a variable of type double via datawindow.GetItemNumber() and then read sent to another datawindow, it would show up as 1002000000002400. I changed the variable from double to a decimal, and during debug I could see the value it was pulling was 1002000000002399.04. I have had other instances where the number is lightly lower, such as 100200000000219 being read as 100200000000218.9941. So this means I can't simply just truncate the decimals.
I am not sure if this only started happening after updating Sybase ASE 15.7 from SP103 to SP140, but that's when I noticed it. This is an existing application from when I started that always ran as a background job.
Other than modifying the field in every table and then throughout the application to be some other type, like BIGINT, is there a way I can fix this issue?
Thanks
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.