TIBConnection and Firebird 4.0.1 lazarus / 21-General ---------------------------------------------------------------------- esdonis · 2022-06-08 14:16 Is it possible to connect and work with a database created in Firebird 4.0.1 using the TIBConnection component with Lazarus 2.2.2? I tried and I can't get the component to connect to the database using the default configuration of Firebird 4.0.1 Has anyone already tried this? ---------------------------------------------------------------------- rvk · 2022-06-08 15:07 Yes, connects without problems. I thought I used to be able to use TSQLQuery with a TIBConnection but I guess I'm wrong. (woops, overlooked the TIBQuery of course  ) Anyway, connection works fine and it works with a TIBDataset. I did find in the past that I needed to change something in the firebird.conf to work with my database design. DataTypeCompatibility = 3.0 You can also specify this per desired type. I think I had problems with INT128 and DECFLOAT (in calculated selects, SUM etc) where mapped wrong to internal fieldtypes. Not sure if that's still the case. https://github.com/mariuz/flamerobin/issues/205 See also: https://ib-aid.com/download/docs/fb4migrationguide.html#_app lication_level_incompatibilities Edit: That does seem to be fixed in latest versions of IBX for Lazarus (from 2.4-0 Build 12543 onwards). So there is no need for DataTypeCompatibility. BTW. You CAN'T connect to databases made in previous versions of Firebird. This was also the case with Firebird 3. You'll need to backup (on F3) and restore (on F4) existing database. Do you also use a Firebird 4 client? If you use an older client then it could be an authentication problem. See https://ib-aid.com/download/docs/fb4migrationguide.html#_authoriza tion_with_firebird_2_5_client_library_fbclient_dll ---------------------------------------------------------------------- esdonis · 2022-06-08 18:55 No, I do not use previous clients of the library. I am trying on a system installed from scratch. It gives me an error when trying to connect, it tells me that the library libfbclient.so.2.5.1 does not exist But I create a symbolic link to the library libfbclient.so.4.0.1 and it keeps giving me the same error ln -sf /opt/firebird/lib/libfbclient.so.4.0.1 /usr/lib/libfbclient.so.2.5.1 Can't find libfbclient.so.2.5.1 library ---------------------------------------------------------------------- rvk · 2022-06-08 18:59 Woops, you didn't specify the OS in your question. I'm on Windows (where it works correctly freshly installed in Sandbox). ---------------------------------------------------------------------- esdonis · 2022-06-08 19:08 I use linux 64 bit devuan testing I'm going to install it on windows to test ---------------------------------------------------------------------- rvk · 2022-06-08 19:27 Looking at the source in FB30ClientAPI.pas it looks for either libfbclient.so or libfbclient.so.2. So not the libfbclient.so.2.5.1 you made. What is the exact error message? I can't find "Can't find libfbclient.so.2.5.1 library" or parts of that anywhere in the source. Do you have an environment variable FIREBIRD which points to something other than lib? Even the FB25ClientAPI.pas doesn't have so.2.5.1 in it. It looks for libfbembed.so, libfbembed.so.2.5, libfbembed.so.2.1, libfbclient.so or libfbclient.so.2. (not 2.5.1) So maybe your better of just doing: ln -sf /opt/firebird/lib/libfbclient.so.4.0.1 /usr/lib/libfbclient.so O, and your Lazarus is 64 bit too? And the /opt/firebird/lib/libfbclient.so.4.0.1 is also 64 bit?? ---------------------------------------------------------------------- rvk · 2022-06-08 20:40 O, and I'm not sure for debian or devuan but shouldn't 64bit so files not be under the /usr/lib/x86_64-linux-gnu directory? (or some other multiarch name if you're using a newer version of devuan) Otherwise set the FIREBIRD environment variable to the directory where the .so is (i.e. /opt/firebird/lib) ---------------------------------------------------------------------- esdonis · 2022-06-09 17:23 In Windows I do not connect, it gives the exception: EIBDatabaseError TIBconnection: DoInternalConnnect: -connection rejected by remote interface I use a clean installation, no old library ---------------------------------------------------------------------- esdonis · 2022-06-09 18:18 Solved in windows but in linux I still haven't been able to. ---------------------------------------------------------------------- rvk · 2022-06-09 22:43 Quote from: esdonis on June 09, 2022, 08:18:38 pmSolved in windows but in linux I still haven't been able to. What exact error message so you get? Did it really say 2.5.1 version missing?? Do you have /usr/lib/x86_64-linux-gnu or similar on your system (like I mentioned)? You could try this in a terminal window: export FIREBIRD=/opt/firebird/lib/ startlazarus ---------------------------------------------------------------------- esdonis · 2022-06-10 12:07 I attach the error in the image ---------------------------------------------------------------------- rvk · 2022-06-10 12:54 You have a /usr/lib/x86_64-linux-gnu. 64 bit so files should be put there, not in /usr/lib So create new symlinks to that directory Also as another option you could create a FIREBIRD environment variable pointing to /opt/firebird/lib (As i already stated in my previous post) Still strange that it says 2.5.1 because I cant find that anywhere. What version of IBX are you using? ---------------------------------------------------------------------- esdonis · 2022-06-13 12:36 Although the mistake he said was that he had not installed the library what I needed to install was the library: libtomcrypt1