Unknown sqltype

351 views
Skip to first unread message

Rand Random

unread,
Nov 4, 2021, 10:35:48 AM11/4/21
to firebird-support
I would like to know why I am getting this error in FlameRobin

Starting transaction...
Preparing statement: select sum(foovalue) from foo
Error: *** IBPP::LogicException ***
Context: RowImpl::AllocVariables
Message: Found an unknown sqltype !
Total execution time: 0.019s

Or this error in SQL Manager Lite for InterBase and Firebird

Unknown SQL Data type (32752).

when I run this simple SQL statement

select sum(foovalue) from foo;

Attached you will find the database.

Database got created with the .NET Provider and EntityFramework Core if that makes any difference. You will find the code in the attached Program.cs file.
Program.cs
DUMMYDB.FDB

Rand Random

unread,
Nov 4, 2021, 10:37:09 AM11/4/21
to firebird-support
Using FB 4.0 (non embedded)

Lucas Schatz

unread,
Nov 4, 2021, 10:40:59 AM11/4/21
to firebird...@googlegroups.com
Hello, Flamerobin will get support for Fb4 data types in the next snapshot only, if you need to configure Firebird 4 to edit firebird.conf to:
DataTypeCompatibility = 3.0
Also you can read more here:

--
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/105a1c1a-e97d-4bc0-adee-766062c712e7n%40googlegroups.com.

Rand Random

unread,
Nov 4, 2021, 10:50:02 AM11/4/21
to firebird-support
I did stumble accross this issue while searching for an answer, but as I understood it this only counts for the new datatypes introduced in FB 4.0 eg. INT128, and not old datatypes like my decimal(18, 2)?
Or does firebird under the hood use an unsupported datatype?

Dimitry Sibiryakov

unread,
Nov 4, 2021, 10:56:22 AM11/4/21
to firebird...@googlegroups.com
Rand Random wrote 04.11.2021 15:50:
> INT128, and not old datatypes like my decimal(18, 2)?
> Or does firebird under the hood use an unsupported datatype?

SUM(DECIMAL(18,2)) has type DECIMAL(34,2) which is internally INT128.

--
WBR, SD.

Rand Random

unread,
Nov 4, 2021, 11:10:33 AM11/4/21
to firebird-support
Ah, okay, so that is the reason why the error only pops up on sum, because min/max, selecting or grouping and many more had no issue and only ran into issues with sum.

Mark Rotteveel

unread,
Nov 4, 2021, 11:39:51 AM11/4/21
to firebird...@googlegroups.com
It should be DECIMAL(38,2).

Mark

Dimitry Sibiryakov

unread,
Nov 4, 2021, 12:05:45 PM11/4/21
to firebird...@googlegroups.com
Mark Rotteveel wrote 04.11.2021 16:39:
>>   SUM(DECIMAL(18,2)) has type DECIMAL(34,2) which is internally INT128.
>
> It should be DECIMAL(38,2).

Ah, I'm sorry, I simply forgot the top precision limit. Perhaps Oracle messed
up with my memory.

--
WBR, SD.

Mark Rotteveel

unread,
Nov 4, 2021, 12:15:37 PM11/4/21
to firebird...@googlegroups.com
Your recollection isn't entirely at fault: it was DECIMAL(34,2) when it
was still backed by DECFLOAT instead of INT128.

Mark
Reply all
Reply to author
Forward
0 new messages