Subject | Re: [firebird-support] 3.x - Check if DB exist using alias |
---|---|
Author | Mark Rotteveel |
Post date | 2019-08-05T15:25:28Z |
On 2019-08-05 15:58, 'Zoran' zoran565@... [firebird-support]
wrote:
doesn't have read access to databases.conf.
Mark
wrote:
> What Dimitry said, or you can try this:That doesn't work remote, nor will it work if the user running this
>
>
>
>
>
> function _GetAliasDBFName(alias): string;
>
> var
>
> sl: TStringList;
>
> begin
>
> result := '';
>
> sl := TStringList.Create;
>
> try
>
> sl.LoadFromFile('C:\Program
> Files\Firebird\Firebird_3_0\databases.conf');
>
> result := sl.Values[alias];
>
> finally
>
> sl.Free;
>
> end;
>
> end;
>
>
>
> Simply call _ GetAliasDBFName and pass your alias name as a param.
> Problem might arise if FB team chooses to change name of database.conf
> file, or re-allocate it.
doesn't have read access to databases.conf.
Mark