| |
| Retrieving BDE system information |
 |
How can I get BDE system status such as size of buffer and heap used, or number of currently loaded drivers, active clients, sessions, databases or cursors?
implementation
uses dbierrs, dbiprocs, dbitypes;
{$R *.DFM}
procedure LogDbiSysInfo(const LogFile: string);
var
Info: SYSInfo;
begin
DbiGetSysInfo(Info);
with TStringList.Create do
try
Clear;
Add(Format('BUFFER SPACE: %d', [Info.iBufferSpace]));
Add(Format('HEAP SPACE: %d', [Info.iHeapSpace]));
Add(Format('DRIVERS: %d', [Info.iDrivers]));
Add(Format('CLIENTS: %d', [Info.iClients]));
Add(Format('SESSIONS: %d', [Info.iSessions]));
Add(Format('DATABASES: %d', [Info.iDatabases]));
Add(Format('CURSORS: %d', [Info.iCursors]));
SaveToFile('c:\logcurs.txt');
finally
Free;
end;
end;
procedure TForm .Button Click(Sender: TObject);
begin
table .Open;
table2.open;
table3.Open;
LogDbiSysInfo('c:\logcurs.txt');
end;end. Output for logcurs.txt:
-----------------------
BUFFER SPACE: 28
HEAP SPACE: 60
DRIVERS: 2
CLIENTS: 2
SESSIONS: 2
DATABASES: 4
CURSORS: 3
|
|
| Hits/month |
2,500,000+ |
Downloads (Since May 2000) |
7,393,709 |
| Total Files |
6,023 |
| Forum msgs |
7,670 |
| Articles/FAQs |
70+/900+ |
Top Selling Software at Amazon
|