Firebird embedded, no database installation necessary!
Firebird provides a very easy way to share the database with smaller applications without having to install them. It is only necessary to copy some files into the directory of the application.
Up to the version 2.5 an own version of the embedded version was delivered. Since version 3.0 this has changed. There are an embedded installation some files from Firebird mitzugeben. These can be located directly in the directory of the Lazarus application, but can also be found in a subdirectory of the application (program). In the development this is definitely better, because one can switch so easily between Firebird 3 and Firebird 4. Note, however, that the database files between versions 3 and 4 are not compatible. It is best to create 2 database files with different names, for example addresses_fb3.fdb and addresses_fb4.fdb. The Zeos 7.3 components run in any case with both versions, as far as I have seen, perfectly. The connection is made just like the "big" database via the path to fbclient.dll.
My second tutorial will be available for download with Firebird Embedded 4. So you can work through it without having to install a database. But you can also use with installed Firebird Server.
It is not so easy to find information about which files should be given. List below for Firebird 3 and Firebird 4. There may still be libraries from Microsoft to install, I have all installed. I would be glad about a feedback in this regard.
Incidentally, a "little trick" allows TZConnect to be active during development when launching Lazarus. Zeos replicates the BDE components on a large scale, so TZConnection.Connected is often set to True in edit mode. If you forget to set Connected to False before starting the compiler and linker, then you have to stop Lazarus again to get it done. Since one works only with a test database when developing the double access should not be a problem. Anyway, I have not had any problems with this trick. Works on Firebird 3 and Firebird 4 embedded.
Simply load the file firebird.conf into an editor and add the following at the end:
ServerMode = SuperClassic
SharedCache = true
SharedDatabase = true
Save and no continuous Connected true / false anymore during development!
Up to the version 2.1.x one could access in this way only a single user or a single program. That is, if you have a database open in the design phase, you will not be able to access the program you are developing while Lazarus is running. In this case you must close the connection to the database (connected: = false), then you can start the program under Lazarus for debugging. From version 2.5 upwards multi-user capability is given. This is especially useful if you want to access your data in parallel with several programs or, as discussed above, want to have the database open in the design and run mode under Lazarus.
I do not currently have much experience with the embedded version. For multi-user operation, an installation of the database is generally preferable.
There is an extensive English PDF file from IBPhoenix for the use of Embedded Server. This is based on Interbase 6, but almost everything in this description should be relevant to Firebird.
IMPORTANT! It may happen that if you did everything as it is stated there, the installation will still not work. Runtime libraries from Microsoft Visual C ++ are required. Usually those with Windows are installed, but sometimes missing.