Exception in IBX with Firebird 4 client lazarus / 16-Databases ---------------------------------------------------------------------- emilt · 2021-06-03 05:53 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 · 2021-06-03 09:02 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. ---------------------------------------------------------------------- emilt · 2021-06-03 09:26 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 · 2021-06-05 08:33 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 · 2021-06-05 18:05 The query is this, and it's part of IBCustomDataSet (see the first post): Code: MySQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Select F.RDB$COMPUTED_BLR,F.RDB$DEFAULT_VALUE, R.RDB$FIELD_NAME, R.RDB$IDENTITY_TYPEfrom RDB$RELATION_FIELDS R, RDB$FIELDS Fwhere R.RDB$RELATION_NAME = :RELATIONand R.RDB$FIELD_SOURCE = F.RDB$FIELD_NAMEand ((not F.RDB$COMPUTED_BLR is NULL) or     (not F.RDB$DEFAULT_VALUE is NULL) or     ( not R.RDB$IDENTITY_TYPE is NULL))  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 · 2021-06-07 10:22 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TIBXINPUTSQLDA.Bind (aMetaData: Firebird.IMessageMetadata);var i: integer;begin  FMetaData: = aMetaData;  with FFirebird30ClientAPI do  begin// Count: = metadata.getCount (StatusIntf);    Count: = aMetaData.getCount (StatusIntf); 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 · 2021-06-07 13:10 Yes, I can confirm that this fix works for me. Thanks! ---------------------------------------------------------------------- tonyw · 2021-06-09 12:19 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 · 2021-06-09 13:50 Quote from: tonyw on June 09, 2021, 02:19:07 pmThis 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!