PreviousData Provider for .NET Guide (9.1 revision 1) Next

PsqlTrace Object

Show this topic in Library frames

The PsqlTrace object is created by the application to debug problems during development. Setting the properties in the PsqlTrace object overrides the settings of the environment variables. See Connection String Options for the Pervasive.SQL Provider for more information. For your final application, be sure to remove references to the PsqlTrace object.

The following code fragment creates a Trace object named MyTrace.txt. All subsequent calls to the data provider will be traced to that file.

PsqlTrace  MyTraceObject = new PsqlTrace(); 
     MyTraceObject.TraceFile="C:\MyTrace.txt"; 
     MyTraceObject.RecreateTrace = 1; 
     MyTraceObject.EnableTrace = 1; 

Table 4-21 describes the public properties for the PsqlTrace object.

Table 4-21 Public Properties of PsqlTrace
Property
Description
EnableTrace
When set to 1 or higher, enables tracing.
The initial default value is 0. Tracing is disabled.
RecreateTrace
When set to 1, recreates the trace file each time the application restarts.
The initial default value is 0. The trace file is appended
TraceFile
Specifies the path and name of the trace file.
The initial default value is \PVSWNET_Trace.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.

Table 4-22 descibes the public methods for PsqlTrace.

Table 4-22 Public Methods of the PsqlTrace Object
Methods
Description
DumpFootprints
Displays the footprint of all source files in a data provider.


Chapter contents
Publication contents

Prev topic: PsqlParameterCollection Object
Next topic: PsqlTransaction Object