From 4593757069afba3832aa786b29bfdc5d1dcc0573 Mon Sep 17 00:00:00 2001 From: sgwp <63001967@qq.com> Date: Fri, 25 Oct 2024 10:20:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public10/ThreeFun/Fun/U_AdoFunc.pas | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 public10/ThreeFun/Fun/U_AdoFunc.pas diff --git a/public10/ThreeFun/Fun/U_AdoFunc.pas b/public10/ThreeFun/Fun/U_AdoFunc.pas new file mode 100644 index 0000000..b29411b --- /dev/null +++ b/public10/ThreeFun/Fun/U_AdoFunc.pas @@ -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.