Subject | RE: [firebird-support] 3.x - Check if DB exist using alias |
---|---|
Author | Zoran |
Post date | 2019-08-06T11:37:02Z |
Agreed. But he can write a UDF in Delphi and define it in special 'Info.fdb'
which is available all the time and requires no security. Since Firebird is
running this UDF, it has all the permissions.
From: firebird-support@yahoogroups.com <firebird-support@yahoogroups.com>
Sent: Monday, August 5, 2019 11:25 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] 3.x - Check if DB exist using alias
On 2019-08-05 15:58, 'Zoran' zoran565@... [firebird-support]
wrote:
doesn't have read access to databases.conf.
Mark
[Non-text portions of this message have been removed]
which is available all the time and requires no security. Since Firebird is
running this UDF, it has all the permissions.
From: firebird-support@yahoogroups.com <firebird-support@yahoogroups.com>
Sent: Monday, August 5, 2019 11:25 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] 3.x - Check if DB exist using alias
On 2019-08-05 15:58, 'Zoran' zoran565@... [firebird-support]
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
[Non-text portions of this message have been removed]