Subject | Re: [firebird-support] UNC to drive letter path |
---|---|
Author | Thomas Bachinger |
Post date | 2003-09-03T10:43:24Z |
Hi Florian,
UNC path I do NOT get the drive letter delivered with it as in your case
\\Server\DriveLetter\SD\SD\File ... in my case I get \\Server\SD\SD\File
instead... so I do not get the chance to rebuild myself the path as you
describe it here. Is there a set of options one can supply to the windows
open dialog for it to send the local drive letter with it...?? If so this
would be the simplest solution and would solve my problem immediately...!
into the application (close to your proposed scenario Nr 2) and it works
just fine with both firebird servers on the company network. You instead
propose to switch the local server on and off, so I read from your lines
that you think that more than one firebird server being present in a network
might cause problems (event thought they manage different databases)???
Thanks,
/Thomas
> the client, your application, must find the database which has to resideorder
> physically on the same machine where the server process is running. In
> to find it, you have several possibilities:can
> 1.
> You can share the whole driveletter of the server where the databasefile
> 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... Ok, maybe I have overlooked something here: because when I retrieve a
> client to something the client can work with.
> In Delphi, this would look like this:
>
> function TrimServerPath(PathName: string): string;
> begin
> //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;
> end;
UNC path I do NOT get the drive letter delivered with it as in your case
\\Server\DriveLetter\SD\SD\File ... in my case I get \\Server\SD\SD\File
instead... so I do not get the chance to rebuild myself the path as you
describe it here. Is there a set of options one can supply to the windows
open dialog for it to send the local drive letter with it...?? If so this
would be the simplest solution and would solve my problem immediately...!
> As for your plans of using both a local and a remote server, the onlything
> what comes to mind is to manually switch on and off your local server... I have tested the whole system by hardcoding the global database path
> whenever needed to work locally.
into the application (close to your proposed scenario Nr 2) and it works
just fine with both firebird servers on the company network. You instead
propose to switch the local server on and off, so I read from your lines
that you think that more than one firebird server being present in a network
might cause problems (event thought they manage different databases)???
Thanks,
/Thomas