TraceEnter, TraceExit Events

Traces database activity within an application for debugging.

Syntax

public delegate void TraceEnterEventHandler(AseConnection
   connection, object source, string method, object[] parameters);
public delegate void TraceExitEventHandler(AseConnection
   connection, object source, string method, object returnValue);

Usage

Use TraceEnter and TraceExit events to hook up your own tracing method. This event is unique to an instance of a connection. This allows different connections to be logged to different files. It can ignore the event, or you can program it for other tracing. In addition, by using a .NET event, you can set up more than one event handler for a single connection object. This enables you to log the event to both a window and a file at the same time.

Enable the ENABLETRACING connection property to trace Adaptive Server ADO.NET Data Provider activities. It is disabled by default to allow for better performance during normal execution where tracing is not needed. When this property is disabled, the TraceEnter and TraceExit events are not triggered, and tracing events are not executed. You can configure ENABLETRACING in the connection string using these values:
  • True – triggers the TraceEnter and TraceExit events.

  • False – the default value; Adaptive Server ADO.NET Data Provider ignores the TraceEnter and TraceExit events.