ADO如何记录SQL日志

ADO如何记录SQL日志

procedure TfrmDM.ADOConnection1WillExecute(Connection: TADOConnection; var CommandText: WideString; var CursorType: TCursorType; var LockType: TADOLockType; var CommandType: TCommandType; var ExecuteOptions: TExecuteOptions; var EventStatus: TEventStatus; const Command: _Command; const Recordset: _Recordset);
begin
// write sql log
if sqldebug then
Log.WriteLog('CommandText:' + CommandText);
end;

posted @ 2017-03-21 10:49  delphi中间件  阅读(658)  评论(0编辑  收藏  举报