Subject Re: [firebird-support] UNC to drive letter path
Author Martijn Tonies
Hi Thomas,

> > I wonder: what has an UNC path - which is a share, right? - to do with
> > the local path and connecting to a database? A UCN path is a _client_
> > side thing, while a local path is a server side thing. Database files
> > should not reside in shared folders.
> .. considering your words, I think that it might be that I use the
> in a wrong way.

I think so too :-)

>I have the following scenario: my application works with two
> databases: (1) a local database that resides by definition on the machine
> where the application process runs (no problems with that), and (2) a
> database that can reside on any remote machine within the company network!
> Both are firebird databases: and that means to me that I have to install a
> firebird server on the client machine as well as on the remote machine
> (or??)????

A client (process) never accesses a database directly. It tells the server
(fbserver.exe for Windows) where to find the database and let's the server
process access the file. Firebird (the server) needs it's databases on a
drive - that is, local to the server process. Firebird CANNOT access a
database file that's on a remote [drive]/[share]/[whatever via the network].

With a client/server install, you have one main server that runs the
server process - clients connect to a database via the server process.

> For my application to connect to and communicate with the global database
> that resides on the remote machine I have to first retrieve the path to
> database location on the remote machine. To do that, the user has to
> establish this connection the very first time he starts the application.
> can do this by using the Windows standard open dialog to choose a location
> on a remote machine for the global database. The Windows open dialog
> always returns a UNC style path for the global database location on the
> remote machine and I found it impossible to convert this UNC path
> (server1\\path1\database.gdb) to the true drive letter path

As you have found out, Firebird cannot use the UNC path, because it
isn't a true local to a database file.

> Another problem is that this UNC path may or may not be a share on the
> client machine. When considering your words I almost read that I should
> allow for this global database to exist, namely I should always force the
> global databse to be on the local machine? I however thougth that a

I wonder why you need a local database in the first place - can you explain
a bit more? Personally, I would use a remote database only, unless the
situation tells me differently.

With regards,

Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions