Author: Radikal Q3
Show/generate the BDE errors list.
Answer:
The list of errors of the BDE, we can obtain it investigating a little in the file
bde.int
There we will see that the error codes are composed of a value ' base' and of an
offset.
Here you have an invention to generate your listing of errors of the BDE:
Add 'dbiprocs' in the uses of your form
Put a TRichEdit (RE1)
And put this in the OnClick of a TButton:
1 procedure TForm1.Button1Click(Sender: TObject);
2 const
3 Bases:array [1..24] of integer=(
4 0,$2100,$2200,$2300,$2400,$2500,$2600,$2700,$2800,
5 $2900,$2A00,$2B00,$2C00,$2D00,$2E00,$2F00,$3000,
6 $3100,$3200,$3300,$3400,$3500,$3E00,$3F00);
7 var
8 ErrorCod:integer;
9 ErrorTexto:array [0..DBIMAXMSGLEN+1] of char;
10 i,n:integer;
11 begin
12 for i:=1 to 24 do
13 for n:=0 to 255 do
14 begin
15 ErrorCod:=Bases[i]+n;
16 DbiGetErrorString(ErrorCod,ErrorTexto);
17 if ErrorTexto<>'' then
18 Re1.Lines.Add('$'+IntToHex(ErrorCod,4)+' ('+
19 IntToStr(ErrorCod)+') = '+ErrorTexto);
20 Application.ProcessMessages;
21 end;
22 end;
|