Strange issue With Qt

55 views
Skip to first unread message

Piergiorgio Valli

unread,
Apr 19, 2024, 3:13:44 AM4/19/24
to firebird-support
Hello

I use Qt with Firebird 5.0, I would like a total with 8 decimal and 

It works if I use 4 decimal

DROP TABLE PRODUCT3;

CREATE TABLE product3 (

id INT PRIMARY KEY,

total DECIMAL(10,4) -- Example: 10 digits with 2 decimal places

);

INSERT INTO product3(id,total) values(1,40001.1234);

SELECT SUM(total) FROM product3


The sum return 40001.1234


Instead if I increase decimals, the record  is inserted,but the query with sum return no records

CREATE TABLE product3 (

id INT PRIMARY KEY,

total DECIMAL(14,8) -- Example: 10 digits with 2 decimal places

);

INSERT INTO product3(id,total) values(1,40001.1234);

SELECT SUM(total) FROM product3


Have you the same issue?


Thanks



Ertan Küçükoglu

unread,
Apr 19, 2024, 3:56:04 AM4/19/24
to firebird...@googlegroups.com
Hi,

Both of your example comments are wrong.

DECIMAL(10,4) -> 123456.7890
Above is 10 digits 4 decimal places.

DECIMAL(14,8) -> 123456.78901234
Above is 14 digits and 8 decimal places.

I tested on v5.0.0.1306 and both works for me and there is the same result for both.
You may want to run just the sum statement alone depending on the tool you are using.

Thanks & Regards,
Ertan

Piergiorgio Valli <pier...@gmail.com>, 19 Nis 2024 Cum, 10:13 tarihinde şunu yazdı:
--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/776481bc-014a-4785-9d31-0752bbb36295n%40googlegroups.com.

Piergiorgio Valli

unread,
Apr 19, 2024, 4:02:16 AM4/19/24
to firebird...@googlegroups.com
Hi Ertan,

I am going to do an "hello sum" example so I can test only sum without additionatio features.

Thanks
For the response.
Pier

Piergiorgio Valli

unread,
Apr 19, 2024, 4:49:43 AM4/19/24
to firebird...@googlegroups.com
Hi Ertan

It is a bug with driver of Qt,the query works with external tools.
Thanks for replay
Pier

AlexPeshkoff

unread,
Apr 20, 2024, 4:48:41 AM4/20/24
to firebird-support
Sooner of all that's something related with returned datatype - int128, which is probably not known to 3-d party driver.
Try
set bind of int128 to bigint;
before

SELECT SUM(total) FROM product3;



пятница, 19 апреля 2024 г. в 10:13:44 UTC+3, pier...@gmail.com:

Piergiorgio Valli

unread,
Apr 20, 2024, 8:16:17 AM4/20/24
to firebird...@googlegroups.com
Hi AlexPeshkoff ,

thanks for comment, yes in the Qt driver for 5.15  int128 is not supported I checked the driver.
case SQL_INT128 

Pier

--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.

Piergiorgio Valli

unread,
Apr 21, 2024, 2:18:57 AM4/21/24
to firebird...@googlegroups.com
Hi ,

thanks, I opened a ticket for Qt, it is fixed in a very short time.
Pier

liviuslivius

unread,
Apr 21, 2024, 5:29:43 AM4/21/24
to firebird...@googlegroups.com
Or simply set compatibility settings in Firebird.conf or use SET BIND.


Regards,
Karol Bieniaszewski


-------- Oryginalna wiadomość --------
Od: Piergiorgio Valli <pier...@gmail.com>
Data: 21.04.2024 08:18 (GMT+01:00)
Temat: Re: [firebird-support] Re: Strange issue With Qt

Mark Rotteveel

unread,
Apr 21, 2024, 5:31:28 AM4/21/24
to firebird...@googlegroups.com
On 21/04/2024 11:29, 'liviuslivius' via firebird-support wrote:
> Or simply set compatibility settings in Firebird.conf or use SET BIND.

That workaround was already suggested by Alex, but it is not a solution,
only a workaround. Getting supported added to the driver you use is the
real solution.

Mark
--
Mark Rotteveel

Piergiorgio Valli

unread,
Apr 21, 2024, 3:19:44 PM4/21/24
to firebird...@googlegroups.com
Hi,

I have already manually fixed the driver and rebuilt it. it works correctly. 

Thanks
Pier
Reply all
Reply to author
Forward
0 new messages