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

    Join Date
    Jun 2003
    Location
    Portugal
    Posts
    106
    Rep Power
    12

    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?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    62
    Rep Power
    13

    Re: Do I always need to write the physical path to my database in the connection string?



    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.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    3
    Rep Power
    0

    Thumbs up e: Do I always need to write the physical path to my database in the connection


    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

IMN logo majestic logo threadwatch logo seochat tools logo