Skip to content

Firebird database alias connection string not working #8813

Closed

Description

@costin77

On a Windows 10 pro 64 -bit PC I am trying to connect to a Firebird 2.1.3 database from foxpro.

I am able to connect it using the next code:

lcsql = "DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;DBNAME= d:\#acces\newsal.fdb;Port=3050"
ln = Sqlstringconnect(lcsql,.T.)

However, when I am trying to use an alias defined in aliases.conf (newsal = d:#acces\newsal.fdb) I am getting "File database is not found":

lcsql = "DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;DBNAME=newsal;Port=3050"
ln = Sqlstringconnect(lcsql,.T.)

Can you please tell me what I am doing wrong?

Activity

  1. mrotteveel commented on Nov 28, 2025

    @mrotteveel
    Member

    In the first place, newsal = d:#acces\newsal.fdb is wrong, it should be newsal = d:\#acces\newsal.fdb

    However, the # is used as a comment symbol in the file, so the alias you defined is actually just d:. If you had quoted the full error, you had probably seen "I/O error for file "D:"". As far as I'm aware, it is not possible to escape it.

  2. mrotteveel commented on Nov 28, 2025

    @mrotteveel
    Member

    In short, if you want to define an alias, the path should not contain a #.

  3. mrotteveel commented on Nov 28, 2025

    @mrotteveel
    Member

    For the future, issues are for reporting bugs. For questions, please use firebird-support or GitHub Discussions.

    I'll move this to the Q&A section of Discussions.

  4. locked and limited conversation to collaborators on Nov 28, 2025
  5. converted this issue into a discussion #8814 on Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions