Delphi .NET (2) Database (71) Delphi IDE (89) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (280)
Exchange Links About this site Links to us 
|
Obtaining more information about BDE Errors
4 comments. Current rating: (2 votes). Leave comments and/ or rate it.
When working with the Borland Database Engine (BDE) you've probably seen exceptions raised by the BDE.
Examples:
- '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;
var
sMsg: String;
i : integer;
begin
try
except
on e : EDBEngineError do
begin
sMsg := 'BDE Error Details:' + #13#10#13#10;
for i := 0 to ErrorCount - 1 do
begin
sMsg := strErrors + '(' + IntToStr(Errors[i].ErrorCode) +
') ' + Errors[i].Message + #13#10
end;
Application.MessageBox(PChar(sMsg), 'Error', MB_ICONHAND + MB_OK)
end;
end;
end. | |  | |  |
Comments:
|
anonymous from United States
|
 |
|
|
The code should be using E.ErrorCount and E.Errors[I].
|
|
anonymous from Mexico
|
|
|
|
youre wrong
|
|
anonymous from United States
|
|
|
|
What exactly does the following BDE error mean?
11108 2B64 Not exact read/write
Thanks in advance
|
|
anonymous from United States
|
 |
|
|
Thanks much.
BTW anon from Mexico is wrong. The code should be using E.ErrorCount & E.Errors.
|
|