Data.SqlExpr.TSQLConnection.SetTraceEvent

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure SetTraceEvent(Event: TDBXTraceEvent);

C++

void __fastcall SetTraceEvent(Data::Dbxcommon::TDBXTraceEvent Event);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Data.SqlExpr.pas
Data.SqlExpr.hpp
Data.SqlExpr TSQLConnection

Description

Associates the SQL connection with a callback function that executes for every SQL command passed to or from the server.

Call SetTraceEvent to assign a callback that responds every time an SQL command passes between the associated dbExpress driver and the database server. The callback function becomes the value of the TraceCallbackEvent property.

Event is the TDBXTraceEvent event that is called for every message that passes between the dbExpress driver and the SQL server.

Tip: Read the TraceCallbackEvent property to determine whether a callback is already assigned before calling the SetTraceEvent method. That way, you can avoid interfering with an existing callback when assigning a new one.

See Also