Subject Re: [firebird-support] UNC to drive letter path
Author Florian Hector

the client, your application, must find the database which has to reside
physically on the same machine where the server process is running. In order
to find it, you have several possibilities:

You can share the whole driveletter of the server where the databasefile can
be found so that the client can find it by means provided by Windows. Since
this only gives you the path as UNC-path, you have to convert it at the
client to something the client can work with.
In Delphi, this would look like this:

function TrimServerPath(PathName: string): string;
//UNC Path looks like this: \\Server\DriveLetter\SD\SD\File
//We need this: Server:DriveLetter:\SD\SD\File
PfadName := StringReplace(Pfadname, '\\', '', []);
PfadName := StringReplace(Pfadname, '\', ':', []);
PfadName := StringReplace(Pfadname, '\', ':\', []);
Result := PfadName;

Though this is possible, it is in fact not a very good idea for several

You give the user the possibility to define the servername or (better) the
IP of the server and to define the path as seen from the server. Your client
puts the two together so that it read for example,\MyDatabaseFiles\DatabaseFile01.fdb
The nice thing about this is, there does not need to be a shared drive or
subdirectory on the server.

An undocumented method described on the website of Claudio Valderrama At present, I cannot connect to it, so I can't give you the
direct link.

Work with Firebird >= 1.5 which can define aliases on the server, I havent't
worked with this so I can't comment on it.

As for your plans of using both a local and a remote server, the only thing
what comes to mind is to manually switch on and off your local server
whenever needed to work locally.