RTFormwork/public10/ThreeFun/Fun/U_AdoFunc.pas

46 lines
884 B
ObjectPascal
Raw Normal View History

2024-10-25 10:20:49 +08:00
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(<><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ʱ<D6BE><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ');
end;
end;
end.