说三道四技术文摘-感悟人生的经典句子
说三道四 > 文档快照

如何返回BDE的状态信息?-Delphi资料

HTML文档下载 WORD文档下载 PDF文档下载
如何返回BDE的状态信息?-Delphi资料

{$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 TForm1.Button1Click(Sender: TObject);

begin

table1.Open;

table2.open;

table3.Open;

LogDbiSysInfo('c:\logcurs.txt');

end;

end.

输出的结果:

BUFFER SPACE: 128

HEAP SPACE: 160

DRIVERS: 2

CLIENTS: 2

SESSIONS: 2

DATABASES: 4

CURSORS: 3

如何调试VCL的源代码?

(1)Tools -> Environment Options,打开Environment Options

(2)选择Library页 -> Library Path

打开Directories对话框

(3)在其中增加$(DELPHI)\Source\VCL

(4)重新编译程序Project->Bulid All Projects,现在设置断点进行调试!

备案号:鲁ICP备13029499号-2 说三道四 www.s3d4.cn 说三道四技术文摘