1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Rep Power

    firebird and delphi

    We are planning on developing a small application, to be installed on several un-networked laptops. Thus we need an easily deployable database solution, which preferrably is file-based (such as access and dbisam), or requires minimal system changes and installation. (The program should be as "stand-alone" as possible).

    I have been told that using firebird i can create a database contained in a .dll file which i can connect to through the delphi application.

    do i make sense ???
    and is this possible ????
  2. #2
  3. Bug Hunter
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Transylvania (Romania)
    Rep Power

    Arrow Installing Embedded server from a zip kit

    Installing Embedded server from a zip kit
    Installing Embedded server from a zip kit
    The embedded server is a client with a fully functional server linked as a dynamic library (fbembed.dll). It has exactly the same features as the usual Superserver and exports the standard Firebird API entry points.

    The Registry entries for Firebird (where the server normally looks for the location of the root directory) are ignored. The root directory of the embedded server is the directory above where its binary file (library) is located.

    Database access
    Only “true local” access is allowed. The embedded server has no support for remote
    protocols, so even access via "localhost" won't work. Authentication and security The security database (security.fdb) is not used in the embedded server and hence is not required. Any user is able to attach to any database. Since both the server and the client run in the same (local) address space, security becomes a question of physical access. SQL privileges are checked, as in other server models.

    You may run any number of applications with the embedded server without any
    conflicts. Having IB/FB server running is not a problem either.
    But you should be aware that you cannot access the same database from multiple embedded servers simultaneously, because they have SuperServer architecture and hence exclusively lock attached databases.

    File structure for the Embedded Server
    Just copy fbembed.dll into the directory where your application resides. Then rename it to either fbclient.dll or gds32.dll, depending on your database connectivity software. Make copies having both names if you will need to use the server tools (isql, gbak, etc.)
    You should also copy firebird.msg, firebird.conf (if necessary) and ib_util.dll to the same directory.
    If external libraries, are required for your application, e.g. INTL support (fbintl.dll) or UDF libraries, they should be located apart from the application directory. To be able to use them, place them into a directory tree which emulates the Firebird server one, i.e., in subdirectories named /intl and /udf directly beneath the directory where the Firebird root files are.

    Open your firebird.conf and set RootDirectory to the root of this directory tree. (Don't forget to erase the "#" comment marker!)

    D:\my_app\gds32.dll (renamed fbembed.dll)
    D:\my_app\fbclient.dll (renamed fbembed.dll)

    RootDirectory = D:\my_app

    Then, start your application. It will use the embedded server as a client library and will be able to access local databases.

    The Firebird uninstall routine preserves and renames the following key files:
    preserves security.gdb or renames it to security.fbnnnn
    preserves firebird.log
    preserves firebird.conf or renames it to firebird.confnnnn
    preserves aliases.conf or renames it to aliases.confnnnn
    "nnnn" is the build number of the old installation.

    No attempt is made to uninstall files that were not part of the original installation.
    Shared files such as fbclient.dll and gds32.dll will be deleted if the share count indicates that no other application is using them. The Registry keys that were created will be removed.
    My home page: http://www.firebirdsql.org and work place :http://www.reea.net
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Rep Power
    And Fb Embedded works like a charm!

    I'm using this as the user-database for my Advanced Data Generator tool. Easy to deploy and I still get to use my favourite tool to create and maintain the database.

    Really, you should give it a try!
    Martijn Tonies
    Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle
    Upscene Productions
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Rep Power
    hi upscene, i would be very grateful if you explain how to use FireBird Embedded Server with Delphi and FibPlus, i created th DB and put int the same Directory the fbemded.dll renaming it to fbclient, i try to access it with FibPlus Database where i put the path, when i execute the app and i order to connect thru the Database component i get "unvailable resource..", when i renamed the dll as gds32.dll the error message changed, i don't know what to do to make the connection, thnx in advance..

IMN logo majestic logo threadwatch logo seochat tools logo