Page 1 of 1

DCQuery - incorrect number interpretation

Posted: Tue Aug 02, 2016 6:43 am
by Victorio
Hi,

I have used _dcquery.prg for create filter key. I know, this is old code (from year 1996 as saw in source), but very useful and universal tool.

With it I have some problem:

:?: I do not know, working on this 2 days, after input number function shorting it for example 10 digits to 9 digits.

it is incomprehensible, why if I input number 1234567890 to create query for field numeric 10,0 , everything is ok, but after input number 223456789 this shorting to 22345678 (to 9 digits).

Also I do not know, where I can modify input field to data .

In attach is _dcquery.prg , where is my modify function DC_QueryBuild_sk.

Re: DCQuery - incorrect number interpretation

Posted: Tue Aug 02, 2016 6:45 am
by Victorio
and pictures with printscreen, where it is bad.

Re: DCQuery - incorrect number interpretation

Posted: Tue Aug 02, 2016 8:18 am
by rdonnay
I cannot reproduce this problem.
I get the correct result.

It may have something to do with your environment.
Please write me a small sample program and give me the database that you are using.

Re: DCQuery - incorrect number interpretation

Posted: Tue Aug 02, 2016 9:00 am
by Victorio
Thank you for answer, Roger,

Ok, I prepare some example.
Interesting is, that some number in query was "rounded",
for example input key for field ICO : 3124586885 was written to (VLASTNICI->ICO)=312458689 :think:

maybe something like SET DECIMALS...

Re: DCQuery - incorrect number interpretation

Posted: Tue Aug 02, 2016 12:55 pm
by Victorio
:P

I found error, in my settings was not set FIXED and DECIMALS.

After set FIXED ON and SET DECIMALS TO 0 everything works fine.

Sorry, my mistake :oops:

PS: stil i do not know, why this numbers, what are Numeric 10,0 (no decimals) was rounded, it looks to processing it as 999999999.9 number with one decimal....