Author Topic: IBX for Lazarus 2.7.11 and 2.7.12 released  (Read 1775 times)

rvk

  • Hero Member
  • *****
  • Posts: 7114
Re: IBX for Lazarus 2.7.11 and 2.7.12 released
« Reply #15 on: October 01, 2026, 09:30:32 am »
I can probably do this without impacting current users - although I am mystified as to why anyone would still want to use Firebird 1.5. If you want to upgrade an existing FB1.5 database then gbak can always be used to upgrade the DB to a more recent version.
If that's the philosophy then you could also strip out all the older 1.5 and ODS10 stuff  :-X  :o

What is the oldest Firebird IBX for Lazarus officially supports?
There could still be someone with a userbase which are on 1.5 (not ready to upgrade).

(for me most are on 2.5 and a couple on 2.1)

tonyw

  • Sr. Member
  • ****
  • Posts: 374
    • MWA Software
Re: IBX for Lazarus 2.7.11 and 2.7.12 released
« Reply #16 on: October 01, 2026, 12:54:52 pm »
I can probably do this without impacting current users - although I am mystified as to why anyone would still want to use Firebird 1.5. If you want to upgrade an existing FB1.5 database then gbak can always be used to upgrade the DB to a more recent version.
If that's the philosophy then you could also strip out all the older 1.5 and ODS10 stuff  :-X  :o

What is the oldest Firebird IBX for Lazarus officially supports?
There could still be someone with a userbase which are on 1.5 (not ready to upgrade).

(for me most are on 2.5 and a couple on 2.1)
Point taken. I never have stated an oldest Firebird release supported. The approach has been to leave old conditional code in place and only fix it if a problem is reported. So I guess this fix comes under that heading.
« Last Edit: October 01, 2026, 01:51:09 pm by tonyw »

maurog

  • Full Member
  • ***
  • Posts: 119
Re: IBX for Lazarus 2.7.11 and 2.7.12 released
« Reply #17 on: October 01, 2026, 01:08:52 pm »
Hi Tony,

Thank you very much for your reply — and for the clarification
regarding IBX's version support policy.

My underlying idea behind this patch was not to create new Firebird
1.5 databases, but to give users a way to rescue their old data.
With this small patch I can now open Firebird 1.5 databases in
TurboBird and at least export the data (CSV, JSON, etc.).

I could ship the minimal required Firebird 1.5 files (client library,
etc.) along with TurboBird, so that the user can rescue their old
data in embedded (local) mode without needing a FB 1.5 installation
of their own — provided that is technically feasible at all.

Currently I am running Firebird 1.5 in server mode; for shipping
with TurboBird, however, the embedded mode would be the more elegant
solution, since the user would then not need their own FB 1.5
installation.

To be honest, I also have my own concerns regarding this patch:
that I might stumble over it elsewhere in TurboBird, because IBX
does not fully support Firebird 1.5.

Thank you once again for even taking a look at it.

Best regards,
Maurog.
And yes, Lazarus is definitely a beast – it comes with everything you need, but sometimes also more than you expect. 😅 (Chat-GPT)

maurog

  • Full Member
  • ***
  • Posts: 119
Re: IBX for Lazarus 2.7.11 and 2.7.12 released
« Reply #18 on: October 04, 2026, 12:37:01 am »
Hi Tony,

while testing IBX with Firebird 6, I encountered a reproducible
behavior with NUMERIC columns of precision > 16. Note that
Firebird itself supports NUMERIC precision up to 38.

Reproduction:
  - Source: FB 6, table with NUMERIC(38,10)
  - Target: FB 6
  - Copy via TIBQuery with parameter binding
  - Value: 12345.6789 (only 9 significant digits)

Error message:
  "BCD Precision (17) is too large for Firebird Data Type
   max precision (16)"

The value actually has only 9 significant digits, but IBX
detects a precision of 17. Is this a known behavior or a bug
in the precision handling?

Best regards,
Maurog.
And yes, Lazarus is definitely a beast – it comes with everything you need, but sometimes also more than you expect. 😅 (Chat-GPT)

tonyw

  • Sr. Member
  • ****
  • Posts: 374
    • MWA Software
Re: IBX for Lazarus 2.7.11 and 2.7.12 released
« Reply #19 on: October 25, 2026, 05:07:44 pm »
Release 2.7.14 is now on github and should soon be on OPM. This should fix the 1.5. issues, You should also take the most recent update for fnintf as this fixes an issue with using a Firebird 1.5 library.

Hi Tony,

Thank you very much for your reply — and for the clarification
regarding IBX's version support policy.

My underlying idea behind this patch was not to create new Firebird
1.5 databases, but to give users a way to rescue their old data.
With this small patch I can now open Firebird 1.5 databases in
TurboBird and at least export the data (CSV, JSON, etc.).

I could ship the minimal required Firebird 1.5 files (client library,
etc.) along with TurboBird, so that the user can rescue their old
data in embedded (local) mode without needing a FB 1.5 installation
of their own — provided that is technically feasible at all.

Currently I am running Firebird 1.5 in server mode; for shipping
with TurboBird, however, the embedded mode would be the more elegant
solution, since the user would then not need their own FB 1.5
installation.

To be honest, I also have my own concerns regarding this patch:
that I might stumble over it elsewhere in TurboBird, because IBX
does not fully support Firebird 1.5.

Thank you once again for even taking a look at it.

Best regards,
Maurog.

tonyw

  • Sr. Member
  • ****
  • Posts: 374
    • MWA Software
Re: IBX for Lazarus 2.7.11 and 2.7.12 released
« Reply #20 on: October 25, 2026, 05:22:37 pm »
Apologies. I read this one when it came in and then promptly forgot about it being heavily into another task.

You get this error when trying to read into an SQL_DEC16 data type when the underlying Firebird API returns an SQL_DEC34. The problem may be due (e.g.) an aggregate result that has come back with with an unexpectedly large precision. It is not uncommon to see this when upgrading a Firebird version and using SQL generated for an older version.

Hi Tony,

while testing IBX with Firebird 6, I encountered a reproducible
behavior with NUMERIC columns of precision > 16. Note that
Firebird itself supports NUMERIC precision up to 38.

Reproduction:
  - Source: FB 6, table with NUMERIC(38,10)
  - Target: FB 6
  - Copy via TIBQuery with parameter binding
  - Value: 12345.6789 (only 9 significant digits)

Error message:
  "BCD Precision (17) is too large for Firebird Data Type
   max precision (16)"

The value actually has only 9 significant digits, but IBX
detects a precision of 17. Is this a known behavior or a bug
in the precision handling?

Best regards,
Maurog.

maurog

  • Full Member
  • ***
  • Posts: 119
Re: IBX for Lazarus 2.7.11 and 2.7.12 released
« Reply #21 on: October 26, 2026, 03:56:48 pm »
Hi Tony,

many thanks for the Firebird 1.5 support and for the explanation regarding decimals.

I have just registered and opened a Firebird 1.0.3 database under a Firebird 1.5 server – works without any problems. Thanks to this patch, TurboBird now supports all Firebird versions (1.0.3 – 6.0). Many thanks for that!

Thanks again for your time – much appreciated.

Best regards,
Maurog..
« Last Edit: October 26, 2026, 04:05:20 pm by maurog »
And yes, Lazarus is definitely a beast – it comes with everything you need, but sometimes also more than you expect. 😅 (Chat-GPT)

tonyw

  • Sr. Member
  • ****
  • Posts: 374
    • MWA Software
Re: IBX for Lazarus 2.7.11 and 2.7.12 released
« Reply #22 on: October 26, 2026, 05:17:30 pm »
Reading again my explanation of the Decimals problem, I may not have made clear that the problem is not necessarily the SQL but with any persistent fields. You have to delete the field using the fields editor in the IDE and then recreate it. IBX will then create the up-to-date field definition - in this case with  wider fielddef.

The underlying problem is the way that Object Pascal saves persistent fields in a form. Once created, they retain the same type until you change them. When you create a persistent field, the IDE asks IBX what the field type is and IBX uses the database metadata. As long as, at runtime, a compatible data type is returned there is no problem. However, when you upgrade the server, columns that result from (e.g.) aggregations can return a different type and this is a classic example of the result.

I may look at whether a runtime check for compatibility is possible when a dataset is opened. However, field bindings are done in TDataset and not in (e.g.) TIBQuery. If it is possible then this would still result in an exception but at least with a more meaningful error message.

Hi Tony,

many thanks for the Firebird 1.5 support and for the explanation regarding decimals.

I have just registered and opened a Firebird 1.0.3 database under a Firebird 1.5 server – works without any problems. Thanks to this patch, TurboBird now supports all Firebird versions (1.0.3 – 6.0). Many thanks for that!

Thanks again for your time – much appreciated.

Best regards,
Maurog..

 

TinyPortal © 2005-2018