Helpful Information
 
 
Category: Firebird SQL Development
Do I always need to write the physical path to my database in the connection string?

Coming from mysql and trying to get a hand on Firebird 1.5 rc3 I found a 'weird'
thing
My connection string is like this:
string conn =
"User=xxxx;" +
"Password=xxxxx;" +
"Database=f:\\fire\\data\\fire.fdb;" +
"DataSource=localhost;" +
"Port=3050;" +
"Dialect=3;" +
"Charset=ISO8859_1;" +
"Role=;" +
"Connection lifetime=30;" +
"Pooling=true;" +
"Packet Size=8192";

and my question is can't "Database=f:\\fire\\data\\fire.fdb;" be replaced
with an alias? Like "Database=fire;" instead of having to write the
physical path? Or this is the way it always should be and I just have a bad habbit? :)

and my question is can't "Database=f:\\fire\\data\\fire.fdb;" be replaced
with an alias? Like "Database=fire;" instead of having to write the
physical path? Or this is the way it always should be and I just have a bad habbit? :) [/B]

There is a configuration file, "aliases.conf", in Firebird folder, where you can add alias name and database full path.
Look also in "firebird.conf". You can restrict database acces to certain folders only and set up various parameters.

You can edit the aliases.conf in the firebird install dir and include a alias. Use it in the connection string 192.168.0.10:alias










privacy (GDPR)