skip to main content
Developing ADO.NET Applications : Microsoft .NET Public Objects/Interfaces Supported : OpenAccessTrace Object
 

OpenAccessTrace Object

The OpenAccessTrace object is created by the application to debug problems during development. For your final application, be sure to remove references to the OpenAccessTrace object. Setting the properties in the OpenAccessTrace object overrides the settings of the environment variables (see Specifying Connection Options).
See Using Environment Variables for information about using environment variables.
The .NET Client provides the option to create a Trace object to help application programmers debug problems during development. To maintain security, trace logs show passwords as five asterisks (*****).
The following code fragment creates a Trace object. All subsequent calls to the .NET Client will be traced to that file.
OpenAccessTrace MyTraceObject = new OpenAccessTrace();
MyTraceObject.TraceFile="C:\\MyTrace";
MyTraceObject.EnableTrace = 1;
The following table provides the properties for the OpenAccessTrace object.
 
Table 36: Properties of the OpenAccessTrace Object
Property
Description
EnableTrace
When set to 1 or higher, enables tracing.
When set to 0 (the initial default), tracing is disabled.
RecreateTrace
When set to 1, recreates the trace file each time the application restarts.
When set to 0 (the initial default), the trace file is appended.
TraceFile
When DDTek_Enable_Trace is set to 1 or higher, this option specifies the path and name of the trace file.
The initial default is \OpenAccessTrace.txt. If the file does not exist, the data provider creates it.
NOTE: Setting EnableTrace starts the tracing process. Therefore, you must define the property values for the trace file before setting EnableTrace. Once the trace processing starts, the values of TraceFile and RecreateTrace cannot be changed.