DCQuery - incorrect number interpretation

This forum is for eXpress++ general support.
Post Reply
Message
Author
Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

DCQuery - incorrect number interpretation

#1 Post 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.
Attachments
pic2.gif
pic2.gif (2.9 KiB) Viewed 9478 times
pic1.gif
pic1.gif (9.81 KiB) Viewed 9478 times
IK50.ZIP
(15.41 KiB) Downloaded 633 times

Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: DCQuery - incorrect number interpretation

#2 Post by Victorio »

and pictures with printscreen, where it is bad.
Attachments
pic4.gif
pic4.gif (3.09 KiB) Viewed 9477 times
pic3.gif
pic3.gif (10.82 KiB) Viewed 9477 times

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCQuery - incorrect number interpretation

#3 Post 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.
The eXpress train is coming - and it has more cars.

Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: DCQuery - incorrect number interpretation

#4 Post 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...

Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: DCQuery - incorrect number interpretation

#5 Post 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....

Post Reply