Subject | Re: [firebird-support] Embedded Server Problem |
---|---|
Author | Nando Dessena |
Post date | 2005-07-15T17:30:14Z |
Walter,
W> I am very much a newbie with IBObjects, someday I will have to
W> figure out how to make it use fbclient.dll.
just search the archives of the IBO support list. You'll find
instructions for doing that are posted about once a week on average.
:-)
W> I removed the
W> "RootDirectory" line from Firebird.conf, I'm not sure if that file is
W> needed at all now.
Well if you haven't changed any settings, then it's not.
W> Aliases.conf now has EdChart=\SpedDemo\db\EDCHART.FDB and the database file
W> is in the db subdirectory. Leaving the drive letter out of the path, so it
W> is a relative reference to the root of the current directory, seems to take
W> care of moving the whole structure from one drive to another, so it should
W> not matter what drive letter my USB flash drive gets assigned to when it is
W> plugged in.
I hate relative paths (personal preference). I propose you do:
MyDatabase.DatabaseName := ExtractFilePath(ParamStr(0)) +
'edchart.fdb';
at application startup (or anyway before you connect) so that your
application always works as long as the database is in the same
folder. If you instead want to retain the ability to change the path
without recompiling your application, then I suggest you use an
optional ini file and do something like:
if IniFileExists then
MyDatabase.DatabaseName := ReadDatabaseNameFromIniFile
else
MyDatabase.DatabaseName := ExtractFilePath(ParamStr(0)) +
'edchart.fdb';
instead. This will also relieve you from having to ship aliases.conf.
W> As for the null pointers etc., I don't know where they came from but as
W> long as they stay gone, I am happy :)
I'm glad you solved it.
Ciao
--
Nando Dessena
http://www.flamerobin.org
======================================================
I support Firebird, I am a Firebird Foundation member!
Join today at http://www.firebirdsql.org/ff/foundation
======================================================
W> I am very much a newbie with IBObjects, someday I will have to
W> figure out how to make it use fbclient.dll.
just search the archives of the IBO support list. You'll find
instructions for doing that are posted about once a week on average.
:-)
W> I removed the
W> "RootDirectory" line from Firebird.conf, I'm not sure if that file is
W> needed at all now.
Well if you haven't changed any settings, then it's not.
W> Aliases.conf now has EdChart=\SpedDemo\db\EDCHART.FDB and the database file
W> is in the db subdirectory. Leaving the drive letter out of the path, so it
W> is a relative reference to the root of the current directory, seems to take
W> care of moving the whole structure from one drive to another, so it should
W> not matter what drive letter my USB flash drive gets assigned to when it is
W> plugged in.
I hate relative paths (personal preference). I propose you do:
MyDatabase.DatabaseName := ExtractFilePath(ParamStr(0)) +
'edchart.fdb';
at application startup (or anyway before you connect) so that your
application always works as long as the database is in the same
folder. If you instead want to retain the ability to change the path
without recompiling your application, then I suggest you use an
optional ini file and do something like:
if IniFileExists then
MyDatabase.DatabaseName := ReadDatabaseNameFromIniFile
else
MyDatabase.DatabaseName := ExtractFilePath(ParamStr(0)) +
'edchart.fdb';
instead. This will also relieve you from having to ship aliases.conf.
W> As for the null pointers etc., I don't know where they came from but as
W> long as they stay gone, I am happy :)
I'm glad you solved it.
Ciao
--
Nando Dessena
http://www.flamerobin.org
======================================================
I support Firebird, I am a Firebird Foundation member!
Join today at http://www.firebirdsql.org/ff/foundation
======================================================