From RAD Studio API Documentation
Jump to: navigation, search



TSQLMonitor = class(TComponent)


class PASCALIMPLEMENTATION TSQLMonitor : public System::Classes::TComponent


Type Visibility Source Unit Parent
class public
Data.SqlExpr Data.SqlExpr


TSQLMonitor intercepts messages that pass between an SQL connection component and a database server and saves them in a string list.

Use TSQLMonitor when debugging the communication between your application and a database server. Each TSQLMonitor instance logs the SQL commands from a particular SQL connection component, adding them to a string list. This allows you to see not only the commands you explicitly add to a SQL dataset or SQL connection component, but also any commands that are generated on your behalf, such as those created by a dataset provider. Use the TraceList property to access the list of SQL commands that has already been logged. The TraceList property is automatically updated when the connection component passes a message to the database server.

Note: TSQLMonitor uses the TraceCallbackEvent property of the SQL connection component whose messages it monitors. If you assign your own callback to that property, the SQL monitor instance will cease to function.

See Also