1
2 unit Unit1;
3
4 interface
5
6 uses
7 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
8 Dialogs,dbierrs, DBTables, StdCtrls;
9
10 type
11 TForm1 = class(TForm)
12 Button1: TButton;
13 Memo1: TMemo;
14 procedure Button1Click(Sender: TObject);
15 private
16 { Private declarations }
17 public
18 { Public declarations }
19 end;
20
21 var
22 Form1: TForm1;
23
24 implementation
25
26 {$R *.dfm}
27
28 procedure fDbiGetSysVersion(List: TStringList);
29 var
30 Month, Day, iHour, iMin, iSec: Word;
31 Year: SmallInt;
32 Ver: SYSVersion;
33 begin
34 Check(DbiGetSysVersion(Ver));
35 List.Clear;
36 List.Add(Format('ENGINE VERSION=%d', [Ver.iVersion]));
37 List.Add(Format('INTERFACE LEVEL=%d', [Ver.iIntfLevel]));
38 Check(DbiDateDecode(Ver.dateVer, Month, Day, Year));
39 List.Add(Format('VERSION DATE=%s', [DateToStr(EncodeDate
40 (Year, Month, Day))]));
41 Check(DbiTimeDecode(Ver.timeVer, iHour, iMin, iSec));
42 List.Add(Format('VERSION TIME=%s', [TimeToStr(EncodeTime
43 (iHour, iMin, iSec div 1000, iSec div 100))]));
44 end;
45
46 procedure TForm1.Button1Click(Sender: TObject);
47 var SL: TStringList;
48
49 begin
50 SL:= TStringList.Create;
51 try
52 fDbiGetSysVersion(SL);
53 except
54 ShowMessage('BDE not installed !');
55 end;
56 Memo1.Lines.Assign(SL);
57 SL.free;
58 end;
59
60
61
62 end.
63
|