Recent

Author Topic: Exception in IBX with Firebird 4 client  (Read 4296 times)

emilt

  • New Member
  • *
  • Posts: 24
Exception in IBX with Firebird 4 client
« on: June 03, 2021, 07:53:04 am »
I am not sure if this is a problem with IBX or Firebird itself, but I have this strange situation: when trying to connect to a 3.0 database using the 4.0 client dll, I get an exception "Data type unknown when Executing:" the long query on the system tables that is now defined as DefaultSQLODS12 at line 4283 of IBCustomDataSet.pas.

It works OK if I use the FBCLIENT.DLL from 3.0.


Soner

  • Full Member
  • ***
  • Posts: 240
Re: Exception in IBX with Firebird 4 client
« Reply #1 on: June 03, 2021, 11:02:28 am »
It is not IBX issue, you must copy engine dll from fb3 in to fb4\plugins folder.
Read Firebird 4.0 Release Notes - 1. General Notes

I did not checked it, i read it last week in fb4 release notes.

Edit: Sorry, I realized now you are talking about client.dll.
« Last Edit: June 03, 2021, 11:04:58 am by Soner »

emilt

  • New Member
  • *
  • Posts: 24
Re: Exception in IBX with Firebird 4 client
« Reply #2 on: June 03, 2021, 11:26:51 am »
I mean the case when an FB4 client is connecting to FB3 engine, regardless if the server itself is FB3 or FB4.

My setup is FB4 server and client on the same PC, with the engine12.dll from FB3 in plugins and respectively listed in firebird.conf. But I also checked this against a separate FB3 server, and the same problem is there.

tonyw

  • Full Member
  • ***
  • Posts: 207
    • MWA Software
Re: Exception in IBX with Firebird 4 client
« Reply #3 on: June 05, 2021, 10:33:58 am »
You should be able to connect to a remote FB3 server from a local FB4 client as long as the authentication schemes match - which I assume they must do as you have got to the point of executing a query.

The error message implies that you have a data type in your query that is unknown to FB3. It would be useful to know the query that caused the problem.

emilt

  • New Member
  • *
  • Posts: 24
Re: Exception in IBX with Firebird 4 client
« Reply #4 on: June 05, 2021, 08:05:42 pm »
The query is this, and it's part of IBCustomDataSet (see the first post):

Code: MySQL  [Select][+][-]
  1. Select F.RDB$COMPUTED_BLR,
  2. F.RDB$DEFAULT_VALUE, R.RDB$FIELD_NAME, R.RDB$IDENTITY_TYPE
  3. from RDB$RELATION_FIELDS R, RDB$FIELDS F
  4. where R.RDB$RELATION_NAME = :RELATION
  5. and R.RDB$FIELD_SOURCE = F.RDB$FIELD_NAME
  6. and ((not F.RDB$COMPUTED_BLR is NULL) or
  7.      (not F.RDB$DEFAULT_VALUE is NULL) or
  8.      ( not R.RDB$IDENTITY_TYPE is NULL))
  9.  

I tried the query in other tools, but couldn't replicate the error outside of IBX. The first two fields are BLOB subtype 2, then a char(10)  and a smallint - nothing special.

bum_bum

  • Newbie
  • Posts: 3
Re: Exception in IBX with Firebird 4 client
« Reply #5 on: June 07, 2021, 12:22:15 pm »
There is a bug in IBX 2.4.0 components. This IBX version works with Firebird-4.0.0.1963-0-Beta2-x64, but does not work with Firebird-4.0.0.2496-1-x64. When calling the Prepare method for an SQL query, an error is thrown: Data type unknown When Executing: (here is the query text).
The fix for this error is quite simple:
1. Open the downloaded package fbintf [Packages -> Open the downloaded package -> (Select fbintf)];
2. Select the FB30Statement.pas file and load it;
3. Find the procedure TIBXINPUTSQLDA.Bind;
4. Make the changes suggested by Vlad Horsun:
Code: Pascal  [Select][+][-]
  1. procedure TIBXINPUTSQLDA.Bind (aMetaData: Firebird.IMessageMetadata);
  2. var i: integer;
  3. begin
  4.   FMetaData: = aMetaData;
  5.   with FFirebird30ClientAPI do
  6.   begin
  7. // Count: = metadata.getCount (StatusIntf);
  8.     Count: = aMetaData.getCount (StatusIntf);
  9.  
5. Correct the procedure in the same way: procedure TIBXOUTPUTSQLDA.Bind (aMetaData: Firebird.IMessageMetadata);
6. Compile, use and sincerely thank Vlad Khorsun, who discovered the error and suggested a way to fix it.

emilt

  • New Member
  • *
  • Posts: 24
Re: Exception in IBX with Firebird 4 client
« Reply #6 on: June 07, 2021, 03:10:14 pm »
Yes, I can confirm that this fix works for me.

Thanks!

tonyw

  • Full Member
  • ***
  • Posts: 207
    • MWA Software
Re: Exception in IBX with Firebird 4 client
« Reply #7 on: June 09, 2021, 02:19:07 pm »
This bug has been fixed in the SVN release, but has not yet been progressed into the release zips. There will be a few days delay before re-issuing the zip files. This delay is intended to ensure that no other bugs are reported that affect Firebird 4.0.0 users.

To update from SVN see https://mwasoftware.co.uk/svn-repository

bum_bum

  • Newbie
  • Posts: 3
Re: Exception in IBX with Firebird 4 client
« Reply #8 on: June 09, 2021, 03:50:56 pm »
This bug has been fixed in the SVN release, but has not yet been progressed into the release zips. There will be a few days delay before re-issuing the zip files. This delay is intended to ensure that no other bugs are reported that affect Firebird 4.0.0 users.

To update from SVN see https://mwasoftware.co.uk/svn-repository
Thank you Tony for your support. I am grateful to you for your work!

 

TinyPortal © 2005-2018