Subject Re: [firebird-support] Connecting to database on remote server
Author Helen Borrie
Tony Christiansen wrote:

> I am running an app on my PC that connects to a database on my firebird
> server FIREBIRDSERVER

> The path is \\FIREBIRDSERVER\E:\DB.FDB

> If my pc has an E: drive (ie I plug in a usb) I can connect to the database.

> If my pc has no E: drive then I cannot connect to the database and get
> the error - unable to complete network request to host "e"

> Why does it matter what physical drives I have on my local machine? Is
> this a quirk or design (I am no DBA expert)

For a remote connection, it is irrelevant what physical drives are on
the client machine - unless, of course, the client application is
running from the host server itself. There are two ways to make a
"remote" connection in this environment: through the local TCP/IP
loopback (localhost, IP address 127.0.0.1) or through the XNET
server. But, if I read you right, you are trying to connect to a
server from an application running on a PC that is physically remote
from FIREBIRDSERVER.
....

> Where is an explanation of the different connection strings.

In the Quick Start guide (in the \doc sub-directory) amongst many
others.

> The path is \\FIREBIRDSERVER\E:\DB.FDB

That connection string tries to use the WNET (Windows Networking)
transport layer. The equivalent TCP/IP path is

FIREBIRDSERVER:E:\DB.FDB

> I am using a TIBDatabase in Delphi
> With databasename property set to \\FIREBIRDSERVER\E:\DB.FDBit connects
> With databasename property set to FIREBIRDSERVER:E:\DB.FDBit does
> not connect with error  unable to complete network request to host "FIREBIRDSERVER"

> My environment is windows and without the \\ the client cannot find the host.

It looks as though your application is compiled with the wrong
transport layer settings in TIBDatabase (the Protocol property), which
would be set to one of cpLocal, cpNetBEUI or cpTCP_IP.

cpLocal represents the old interface known in Delphi circles as
"Windows local". That transport in Firebird is known as XNET, and Fb3
does not support it directly any more from the combination of Protocol
cpLocal and the local pathname. The string now has to be like this:

xnet://FIREBIRDSERVER:E:\DB.FDB

However, that is a "by-the-by", since you are not aiming
(intentionally) to make an XNET connection. So my guess is that your
application is trying to connect using the cpLocal transport - hence
the reason it is barfing on the path to an E: drive that it cannot
find on the local box; and succeeding when attempted locally on the
server host. And, of course, when it does find an E: drive on the
client machine, there is no Firebird server running locally and no
database to connect to. So you get 'unable to complete network
request to host "FIREBIRDSERVER".

If you want to make a WNET connection, using the string you have been
using, set the application's Protocol property to cpNetBEUI. TCP/IP
(cpTCP_IP) is preferred, however, as WNET is notoriously noisy. You
must set up the Protocol and DatabaseName properties as appropriate to
each other and to the transport you want to use. If you get it right
on the application side, Fb3 should be able to sort it out on the
server side.

Helen




---
This email has been checked for viruses by AVG.
https://www.avg.com