Check If The BDE Is Installed
You can use this tip to check if the Borland Database Engine (BDE) is installed.
function isbdepresent: boolean;
var
IdapiPath: array[0..255] of Char;
IdapiHandle: THandle;
begin
result := false;
GetProfileString(‘IDAPI’, ‘DLLPath’, ‘C:’, IdapiPath, 255);
{next lines isolates the first directory path from the IdapiPath in case
there are more}
if Pos(‘;’, StrPas(IdapiPath)) <> 0 then
begin
StrPCopy(IdapiPath, Copy(StrPas(IdapiPath), 1, Pred(Pos(‘;’,
StrPas(IdapiPath)))));
end;
IdapiHandle := LoadLibrary(StrCat(IdapiPath, ‘IDAPI01.DLL’));
if IdapiHandle < HINSTANCE_ERROR then
result := false
{IDAPI is not present on this system}
else
begin
FreeLibrary(IdapiHandle);
result := true;
{IDAPI is present on this system}
end;
end;
var
IdapiPath: array[0..255] of Char;
IdapiHandle: THandle;
begin
result := false;
GetProfileString(‘IDAPI’, ‘DLLPath’, ‘C:’, IdapiPath, 255);
{next lines isolates the first directory path from the IdapiPath in case
there are more}
if Pos(‘;’, StrPas(IdapiPath)) <> 0 then
begin
StrPCopy(IdapiPath, Copy(StrPas(IdapiPath), 1, Pred(Pos(‘;’,
StrPas(IdapiPath)))));
end;
IdapiHandle := LoadLibrary(StrCat(IdapiPath, ‘IDAPI01.DLL’));
if IdapiHandle < HINSTANCE_ERROR then
result := false
{IDAPI is not present on this system}
else
begin
FreeLibrary(IdapiHandle);
result := true;
{IDAPI is present on this system}
end;
end;
How to check if a directory exists? procedure TForm1.Bu...
TPNGImage is a complete Pascal (Delphi) library for handling...
With this procedure we can show deleted record from paradox ...
TXLSFile is a Borland Delphi library for reading and writing...
ZylSerialPort is a Delphi & C++Builder thread based asynchro...
Sunday 02 Sep 2007 | Delphi Tutorial | Database