Board index » delphi » Testing if BDE is installed

Testing if BDE is installed

Hello,

Is there a function or procedure to test at runtime from a Delphi app is BDE
is already installed on a computer or not ?

Valerie.

 

Re:Testing if BDE is installed


One way I came up with was as follows:

Create the following unit -

unit uBDEAvail;

interface

function IsBDEAvailable: Boolean;

implementation

uses DBTables;

function IsBDEAvailable: Boolean;
begin
  Result := True;
  with TSession.Create(nil) do try
    AutoSessionName := True;
    try
      Active := True;
    except
      on EDBEngineError do begin
        Result := False;
      end;
    end;
  finally
    Free;
  end;
end;

end.

You'll need to check the return value of this function from probably the
main routine of your application, and before you instantiate any other units
which make use of the BDE.

HTH,

Conor

Quote
V. Bernhardt <geocons...@wanadoo.fr> wrote in message

news:8gb7g5$o6v$1@wanadoo.fr...
Quote
> Hello,

> Is there a function or procedure to test at runtime from a Delphi app is
BDE
> is already installed on a computer or not ?

> Valerie.

Other Threads