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: amministrazi...@pec.p-soft.biz <mailto:amministrazi...@pec.p-soft.biz> 
cod.intermediario SDI: KRRH6B9
 





[Non-text portions of this message have been removed]

  • [firebird... Zsazsi m-zs...@freemail.hu [firebird-support]
    • [fir... 'P-Soft - Fabio Codebue' f.code...@p-soft.biz [firebird-support]
      • ... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
      • ... 'Zoran' zoran...@gmail.com [firebird-support]
        • ... Elmar Haneke el...@haneke.de [firebird-support]
        • ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
          • ... 'Zoran' zoran...@gmail.com [firebird-support]
    • Re: ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
      • ... m-zs...@freemail.hu [firebird-support]
        • ... DougC d...@moosemail.net [firebird-support]
        • ... Elmar Haneke el...@haneke.de [firebird-support]

Reply via email to