Subject Re: [firebird-support] 3.x - Check if DB exist using alias
Author Elmar Haneke
There are some important preconditions on this:

1. The Program has to run locally on the server

2. It does need read permissions to that file

3. You need to know where firebird server is installed


Am 05.08.19 um 15:58 schrieb 'Zoran' zoran565@... [firebird-support]:
> What Dimitry said, or you can try 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.
>
>
>
>
>
>
>
> From: firebird-support@yahoogroups.com <firebird-support@yahoogroups.com>
> Sent: Monday, August 5, 2019 8:06 AM
> To: firebird-support@yahoogroups.com
> Subject: [firebird-support] 3.x - Check if DB exist using alias
>
>
>
>
>
> I'm using Delphi.
>
> Which is the best way to check if a database exist if my connection is alias based?
>
>
>
> I have to try to connect and manage response?
>
> Is there another way?
>
>
>
> Fabio Codebue
>
>
>
> P-SOFT di Codebue Fabio
>
> Via Nuova n. 9 - 24060 Tavernola B.sca (BG)
>
> P.I. 03624950162
>
> C.F. CDBFBA72A11C618T
>
> Mobile: +39.348.3515786
>
> Fax: +39.030.5100306
>
> Web: <http://www.p-soft.biz/> http://www.p-soft.biz
>
>
>
> pec: amministrazione@pec.p-soft.biz <mailto:amministrazione@pec.p-soft.biz>
> cod.intermediario SDI: KRRH6B9
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
> Posted by: "Zoran" <zoran565@...>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Documentation item
> on the main (top) menu. Try FAQ and other links from the left-side menu there.
>
> Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ------------------------------------
>
> Yahoo Groups Links
>
>
>
>
--
Mit freundlichen Grüßen

Elmar Haneke

===========================================================
|Dr. Elmar Haneke Tel: +49-2241-39749-0 |
| Fax: +49-2241-39749-30|
|Haneke Software WWW: www.haneke.de |
|Dr. Elmar und Hubertus Haneke Mail: elmar@... |
|Johannesstraße 41 |
|53721 Siegburg USt-IdNr. DE 123387209|
===========================================================