Example connection string for Applications that use the ODBC function SQLDriverConnect:
1. Open("DSN=myDb;")
2. Open("DSN=myDb; UID=MCSSITE; PWD=mcssite;")
3. Open("DSN=myDb; UID=MCSSITE; PWD=mcssite; DBNAME=172.17.2.10:/usr/local/db/myDb.fdb;")
4. Open("DRIVER=Firebird/InterBase(r) driver; DBNAME=172.17.2.10:/usr/local/db/myDb.fdb;")
5. Open("DRIVER=Firebird/InterBase(r) driver; UID=MCSSITE; PWD=mcssite; DBNAME=172.17.2.10:/usr/local/db/myDb.fdb;")
also
6. Open("DRIVER=Firebird/InterBase(r) driver; UID=MCSSITE; PWD=mcssite; DBNAME=dummy;")
dummy – is an alias derived from the Firebird aliases.conf file. If the environment variables ISC_PASSWORD and ISC_USER are set then the driver will use these.
DBNAME string for remote connect | Comments |
172.17.2.10:/usr/local/db/myDb.fdb | using the server IP address, with a file name following Unix notation |
myserver:/usr/local/db/myDb.fdb | using the server name, with a file name following Unix notation |
172.17.2.10/3051:/usr/local/db/myDb.fdb | using the server IP address and especifing an alternate port, with a file name following Unix notation |
myserver/3051:/usr/local/db/myDb.fdb | using the server name and especifing an alternate port, with a file name following Unix notation |
172.17.2.10:c:\db\myDb.fdb | using the server IP address, with a file name following Windows notation |
myserver:c:\db\myDb.fdb | using the server name, with a file name following Windows notation |
172.17.2.10/3051:c:\db\myDb.fdb | using the server IP address and especifing an alternate port, with a file name following Windows notation |
myserver/3051:c:\db\myDb.fdb | using the server name and especifing an alternate port, with a file name following Windows notation |
127.0.0.1:/usr/local/db/myDb.fdb | using the loopback interface, with a file name following Unix notation |
localhost:/usr/local/db/myDb.fdb | using the loopback interface, with a file name following Unix notation |
127.0.0.1:c:\db\myDb.fdb | using the loopback interface, with a file name following Windows notation |
localhost:c:\db\myDb.fdb | using the loopback interface, with a file name following Windows notation |
DBNAME string for local connect | Comments |
C:\db\myDb.fdb | local conection on a Windows Server |
/usr/local/db/myDb.fdb | local conection with a file name following Unix notation |
Example alias: Using the Firebird aliases.conf e.g. set
DBNAME string for use alias | Comments |
172.17.2.10:dummy | remote conection using the server IP address and an alias |
myserver:dummy | remote conection using the server name and an alias |
Note that does not matter for the client if the server are Unix or Windows, one should just specify the alias name, and on the aliases.conf you define the real file name.