embedded Firebird app installation lazarus / 16-Databases ---------------------------------------------------------------------- ronhud · 2022-05-02 09:59 I have a Lazarus app with an embedded Firebird database developed on a pc with Firebird installed.  I installed the app on my laptop some time ago and it ran succesfully ther.   The laptop then acquired serious corruption and I did a full clean installation of Windows 10 pro and copied my app onto the laptop.   On starting it I get an error message :- DMibConnection1:DoInternalConnect: -unavailable database The database(FDB)  is in a separate folder and the app reads an ini file to get the correct path. I have copied into the app folder the followng:- fbclient.dll firebird.msg ib_util.dll icudt30.dll icuin30.dll icuuc30.dll all from the development pc. I tried to access the database from FlameRobin and received a message which included the following SQLMessage -902    Unsuccesful execution caused by a System error that precludes successful execution of subsequent statements. Engine Code: 335544721   Unable to complete network request to host "localhost" Are the files I have copied over enough or have I missed something?   It all worked on the laptop before I had to do the full install and I cant recall what steps I took in putting the app on it initially. I have looked at Firebird references to using the embedded server option and think I have done what it says. ---------------------------------------------------------------------- Zvoni · 2022-05-02 10:14 and reading this link: https://www.firebirdsql.org/pdfmanual/html/ufb- cs-embedded.html the first sentence is QuoteEmbedded server on Windows The Windows Embedded Server is a Superserver engine plus client rolled into one library, called fbembed.dll. ---------------------------------------------------------------------- rvk · 2022-05-02 10:20 Besides the dll you mentioned you also need the intl and udf directories. The link Zvoni gave has a description of everything you need. And if you use FlameRobin in embedded state you also need to copy all those things to the directory where flamerobin.exe is. And don't use it the same time as your own application. ---------------------------------------------------------------------- korba812 · 2022-05-02 10:20 What version of Firebird are you using? If version 3 or higher then you must have the "plugins" directory along with the file "engine12.dll" (FB 3) or "engine13.dll" (FB 4). http://www.ibphoenix.com/files/Embedded_fb3.pdf ---------------------------------------------------------------------- ronhud · 2022-05-02 10:24 Thanks I read that fbembed.dll should have its name changed to fbclient.dll - anyway I I have just tried changing it's name but same error.  Also FlameRobin fails. The instruction to rename is further down in the document you refer to. ---------------------------------------------------------------------- rvk · 2022-05-02 10:40 What is the connectionstring? You mentioned localhost in flamerobin but with the embedded firebird you shouldn't use localhost: notation. ---------------------------------------------------------------------- ronhud · 2022-05-02 10:56 Thanks to everyone.   As the app is something for my own use only I took the route of installing Firebird  on the laptop and everything seems to work ok - crude but quick. ---------------------------------------------------------------------- tonyw · 2022-05-04 13:07 The point that seems to be missing from the above is that on Wndows you need a registry entry pointing to the Firebird directory. The FB installer creates one for you, if you install manually then either you have to create one yourself or your app needs to have its own conventions as to how it finds the DLLs. Sometimes setting the FIREBIRD environment variable does the trick. Other times placing the DLLs on the system PATH works. See section 13.1 in my Firebird Pascal API Guide for deployment guidelines - https://mwasoftware.co.uk/downloads/send/5-ibx- current/146-firebirdpascalapiguide. Section 3.3 of the same doc describes how IBX/fbintf locates the Firebird DLL. ---------------------------------------------------------------------- rvk · 2022-05-04 19:34 Quote from: tonyw on May 04, 2022, 03:07:45 pmThe point that seems to be missing from the above is that on Wndows you need a registry entry pointing to the Firebird directory. The FB installer creates one for you, if you install manually then either you have to create one yourself or your app needs to have its own conventions as to how it finds the DLLs. Sometimes setting the FIREBIRD environment variable does the trick. Other times placing the DLLs on the system PATH works. ronhud was talking about the embedded version. With that one the DLL's need to be placed in the .exe directory. You wouldn't want to spread those files around the whole system or create registry entries (otherwise the whole embedding isn't really useful. imagine multiple installations with different embedded version which all create their own registry entries. YIKES). But for Firebird SQL < 3.0 the intl and udf directories are also needed and you need to make sure you have the correct fbclient.dll (renamed from fbembed.dll). You can put some of these in a subdirectory but you need to fiddle with firebird.conf in that case. You ALSO need to make sure the bitness (32bit/64bit) of fbclient.dll matches the one of your .exe program (a very common mistake to make). So there are some extra things you need to take care of. And Firebird SQL 3.0+ works a bit different too. And lastly, you should use the correct connectionstring (no localhost or hostname in the string).