Subject Re: [firebird-support] Path to DB with embedded
Author Woody (TMW)
From: "Chad Z. Hower aka Kudzu" <chad-jm@...>
> Im shipping a demo of something and I don't want to mess around with paths
> etc. It has source too and most users will run source.
>
> I thought maybe if I left the path off the Database= parameter (Using .NET
> provider in connection string, but I don't think the question is specific
to
> it) might tell it to look for the fdb file in the same dir as the
> fbembed.dll, but that doesn't seem to work.
>
> Is there anyway to do anything similar to this?

If the database is in the same directory as the app, you can get the
directory from the command line used to execute the program. In Delphi this
is done using ParamStr(0), don't know about other languages. You can then
use that for the path by tacking on the database name. If the program is
installed and the database can be in a different directory of the users
choosing, you can store the location in a INI file or something similar and
read that before connecting the database component.

HTH

Woody (TMW)