EPUB | CHM | PDF

TMySQLMonitor.Events.OnSQL

Top Previous Next

Reports dynamic SQL activity on MySQL applications.

Syntax:

type TSQLEvent = procedure(const Application, Database, Msg, SQL, ErrorMsg: string;
    DataType: TMySQLTraceFlag; const ExecutedOK: boolean; EventTime: TDateTime) of object;
OnSQL: TSQLEvent;

Description:

Write an OnSQL event handler to report dynamic SQL activity on MySQL applications.

Application

Owner application name;

Database

If SQL is executed within a specific database, this parameter indicates its name;

Msg

This parameter indicates the type of the executed operation as string - CONNECT, DISCONNECT, EXECUTE, FETCH, etc.;

SQL

This parameter contains full executed SQL statement, if such is available;

ErrorMsg

If statement executed with error, this parameter returns the error message, otherwise it is empty;

DataType

This parameter indicates the type of the executed operation as enumerated data;

ExecutedOK

This parameter indicates if operation execution succeeded;

EventTime

Indicates the time when the command passed to or from the MySQL server.