select datatype FB 2.4 & 4

17 views
Skip to first unread message

Hugo Larson

unread,
Jun 3, 2021, 10:31:02 PMJun 3
to Firebird-support
Hello,

select count (*) from product

FB4 returns long

FB25 returns integer

This cause combability issues migrating to FB4.
Any solution besides rewriting my sql?

Thanks,
Hugo

Lucas Schatz

unread,
Jun 3, 2021, 11:37:23 PMJun 3
to firebird-support
No problem, at firebird.conf you find this:


# ----------------------------
# Engine currently provides a number of new datatypes unknown to legacy clients.
# In order to simplify use of old applications set this parameter to minor FB
# version datatype compatibility with which you need. Currently two values are
# supported: 3.0 & 2.5.
# More precise (including per-session) tuning is possible via SQL and DPB.
#
# Per-database configurable.
#
#    Type: string
#
#DataTypeCompatibility =
Just set 'DataTypeCompatibility ' to 2.5 or 3.0

Hugo Larson

unread,
Jun 4, 2021, 12:25:40 AMJun 4
to firebird-support
Perfect. Thanks.

--
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/f5160092-8524-451c-ac57-bb7e5b7000ben%40googlegroups.com.

Mark Rotteveel

unread,
Jun 4, 2021, 4:20:56 AMJun 4
to firebird...@googlegroups.com
This was introduced in Firebird 3, see
https://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rlsnotes30.html#rnfb30-dml-countresult.
You will need to change your code to be able to handle `BIGINT`/(Java)
long. There is no compatibility option for this.

Mark

Mark Rotteveel

unread,
Jun 4, 2021, 4:22:06 AMJun 4
to firebird...@googlegroups.com
As far as I'm aware, this option won't help for this, as BIGINT is a
datatype supported by Firebird 2.5.

Mark

Hugo Larson

unread,
Jun 4, 2021, 4:27:21 AMJun 4
to firebird...@googlegroups.com
Actually it worked.

--
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-support+unsub...@googlegroups.com.

To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/1d63b248a22d999b296af4a7f034c4b1%40lawinegevaar.nl.

Mark Rotteveel

unread,
Jun 4, 2021, 4:45:14 AMJun 4
to firebird...@googlegroups.com
On 2021-06-04 10:27, 'Hugo Larson' via firebird-support wrote:
> Actually it worked.

Interesting, I thought it purely concerned itself with data types, not
this type of behaviour.

Mark
Reply all
Reply to author
Forward
0 new messages