On 23/05/2024 15:28, Jonny 14 wrote:
> Hello!
> We have a task to use the same one base with two different FB version at
> the same time. This happens because the old application developed for
> use FB 2.5 and new another application using FB 5. Can the FB support
> this mode?
That isn't possible. If it is a Firebird 5.0 database, it can't be
opened under Firebird 2.5, and if it is a Firebird 2.5 database, it
can't be opened under Firebird 5.0.
That said, are you sure your application doesn't work on Firebird 5.0?
Are there specific concerns with using it with Firebird 5.0?
> Also we found in the firebird.conf "DataTypeCompatibility = 2.5" , can
> we use this mode for special dedicated connections to resolve this problem?
That setting only manages that datatypes introduced in Firebird 3.0 and
later will be automatically converted to datatypes available in Firebird
2.5.
This can be useful if your application accesses tables or functions that
return newer datatypes, but your application can't handle those types.
However, it doesn't make the server behave as Firebird 2.5.
As a simple example, your application calls CURRENT_TIMESTAMP, which
since Firebird 4.0 returns TIMESTAMP WITH TIME ZONE. If you cannot
change your application to use LOCALTIMESTAMP (which is available since
Firebird 2.5.9!), then using DataTypeCompatibility (or the SET BIND
statement, or the isc_dpb_set_bind configuration parameter) will
instruct Firebird to map the type back to TIMESTAMP [WITHOUT TIME ZONE].
However, it doesn't change some of the other behavioural changes. For
example, since - IIRC - Firebird 3.0, COUNT() will return BIGINT instead
of INTEGER. Given Firebird 2.5 also supports BIGINT, that will not be
mapped to another datatype.
Mark
--
Mark Rotteveel