Subject | Re: [firebird-support] ODBC connection to remote database |
---|---|
Author | Helen Borrie |
Post date | 2011-05-18T23:44:44Z |
At 09:01 AM 19/05/2011, Brooks Norton wrote:
So - suppose that, on the host machine, you have the database in c:\db\mrt_db.fdb on a machine called Myserver that is visible to others in the network, included the client machine that you want to connect from.
The connection string to connect to it from a remote machine via TCP/IP network protocol is as follows:
MyServer:c:\db\mrt_db.fdb
Or if you want to use the deprecated NetBEUI protocol:
\\MyServer\c:\db\mrt_db.fdb
Better still, in aliases.conf in your Fb root on the host, make an alias for your database. The rule is the same: must be a physical path. So, in aliases.conf
MyDb = c:\db\mrt_db.fdb
Save it.
Then, for connection strings:
MyServer:MyDb (TCP/IP)
or
\\MyServer\MyDb (NetBEUI)
./hb
>OK so far.
>We have an XP Pro computer with Firebird installed and the database is up and working there. I also installed the Firebird ODBC driver on the same computer and can from Access link to the tables in the Firebird database. Now I am trying to connect to it from my pc across the network.
>On the db computer I shared the folder the Firebird db resides in. I mapped a drive on my computer to the Firebird computer.Here's the mistake. You can't connect to a database on a mapped drive, or anything else but the absolute physical path to the database file *as seen from the host machine*.
So - suppose that, on the host machine, you have the database in c:\db\mrt_db.fdb on a machine called Myserver that is visible to others in the network, included the client machine that you want to connect from.
The connection string to connect to it from a remote machine via TCP/IP network protocol is as follows:
MyServer:c:\db\mrt_db.fdb
Or if you want to use the deprecated NetBEUI protocol:
\\MyServer\c:\db\mrt_db.fdb
Better still, in aliases.conf in your Fb root on the host, make an alias for your database. The rule is the same: must be a physical path. So, in aliases.conf
MyDb = c:\db\mrt_db.fdb
Save it.
Then, for connection strings:
MyServer:MyDb (TCP/IP)
or
\\MyServer\MyDb (NetBEUI)
./hb