日志函数
This commit is contained in:
parent
ad92d66f48
commit
4593757069
45
public10/ThreeFun/Fun/U_AdoFunc.pas
Normal file
45
public10/ThreeFun/Fun/U_AdoFunc.pas
Normal file
|
@ -0,0 +1,45 @@
|
|||
unit U_AdoFunc;
|
||||
|
||||
interface
|
||||
uses
|
||||
Windows, SysUtils, Messages, Classes, Controls, StdCtrls, ComCtrls, Forms,
|
||||
ExtCtrls, ComObj, ActiveX, cxMemo, cxButtons, Graphics, IniFiles,
|
||||
Dialogs, Menus, DB, ADODB,Dbclient ;
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
function writeSysLog(AdoCmd:TADOQuery;cds_data:TclientDataSet):boolean;
|
||||
var
|
||||
i:Integer;
|
||||
mfieldName:string;
|
||||
begin
|
||||
result:=false;
|
||||
try
|
||||
with AdoCmd do
|
||||
begin
|
||||
close;
|
||||
sql.clear;
|
||||
sql.add('select * from SY_SysLog where 1=2');
|
||||
open;
|
||||
cds_data.First;
|
||||
while cds_data.eof do
|
||||
begin
|
||||
append;
|
||||
for I := 0 to cds_data.FieldCount-1 do
|
||||
begin
|
||||
FieldByName(mfieldName).value:=cds_data.FieldByName(mfieldName).value ;
|
||||
end;
|
||||
post;
|
||||
|
||||
cds_data.Next;
|
||||
end;
|
||||
|
||||
end;
|
||||
result:=true;
|
||||
except
|
||||
Application.MessageBox('写数据日志时发生错误!','警告信息');
|
||||
end;
|
||||
|
||||
end;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user