Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
howt to check if the BDE is installed 3 ways Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
heck if the BDE is installed 28-Oct-02
Category
BDE
Language
Delphi 4.x
Views
143
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			
Author: Jonas Bilinkevicius

I want to run the BDE install from my own setup application. Before I run the BDE 
installation, I would like to check that BDE is installed.

Answer:

Solve 1:

1   function isbdepresent: boolean;
2   var
3     IdapiPath: array[0..255] of Char;
4     IdapiHandle: THandle;
5   begin
6     result := false;
7     GetProfileString('IDAPI', 'DLLPath', 'C:\', IdapiPath, 255);
8     {next lines isolates the first directory path from the IdapiPath in case 
9   	there are more}
10    if Pos(';', StrPas(IdapiPath)) <> 0 then
11    begin
12      StrPCopy(IdapiPath, Copy(StrPas(IdapiPath), 1, Pred(Pos(';',
13        StrPas(IdapiPath)))));
14    end;
15    IdapiHandle := LoadLibrary(StrCat(IdapiPath, '\IDAPI01.DLL'));
16    if IdapiHandle < HINSTANCE_ERROR then
17      result := false
18        {IDAPI is not present on this system}
19    else
20    begin
21      FreeLibrary(IdapiHandle);
22      result := true;
23      {IDAPI is present on this system}
24    end;
25  end;



Solve 2:

Try to check the registry for the presence of the BDE:

26  with TRegistry.create do
27  begin
28    Rootkey := HKEY_LOCAL_MACHINE;
29    OpenKey('SOFTWARE\BORLAND\DATABASE ENGINE', false);
30    CFGFile := ReadString('CONFIGFILE01');
31    Free;
32  end;



Solve 3:

you can try to initialize the BDE 
33  
34  IsBDEExist := (dbiInit(nil) = 0)


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC