DelphiFAQ Home Search:
General :: Programming :: Delphi :: Database
Database development with Delphi. Includes issues with BDE, ADO and InterBase.


This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Only the 40 most recently viewed articles are shown.
You can see the full list here.

Featured Article

Obtaining more information about BDE Errors

When working with the Borland Database Engine (BDE) you've probably seen exceptions raised by the BDE.


  • 'Key violation'
  • 'Table does not exist'
The raised exception EDBEngineError is a subclass of the Exception class, one with additional functionality not provided in the base class.

Specifically, EDBEngineError errors are lists of other error messages. You can enumerate the error messages and display them as additional information when problems occur, as shown in the following example.

program BDE_Error_Demo;
   sMsg: String;
   i   : integer;
 // Uses the EDBEngineError's ErrorCount() method to enumerate all errors 
 // on BDE's stack of messages. They are collected in a string and displayed. 
   // something prone to errors.. 
     on e : EDBEngineError do 
         sMsg := 'BDE Error Details:' + #13#10#13#10; 
         for i := 0 to ErrorCount - 1 do 
           sMsg := strErrors + '(' + IntToStr(Errors[i].ErrorCode) + 
                   ') ' + Errors[i].Message + #13#10 
         end; { for i }
         Application.MessageBox(PChar(sMsg), 'Error', MB_ICONHAND + MB_OK) 
   end; { try } 

Generated 20:01:02 on Nov 20, 2019