Mega Code Archive

 
Categories / Delphi / ADO Database
 

To check if BDE exists

Title: To check if BDE exists Question: How can I check in run-time if BDE was installed? Answer: To check the BDE exists you can in two methods: 1. read the registry key: RootKey := HKEY_LOCAL_MACHINE; OpenKey('SOFTWARE\Borland\Database Engine', False); try s := ReadString('CONFIGFILE01'); //BDE installed finally CloseKey; end; 2. you can try to initialize the BDE IsBDEExist := (dbiInit(nil) = 0) PS: personally I prefer the second method because the some no-good un-installators may remove the BDE-file but forget to delete the key in registry:)