Enabling tracing on the TableViewer sample application involves creating a configuration file that references the ConsoleTraceListener and TextWriterTraceListener listeners, removes the default listener, and enables all switches that would otherwise be set to 0.
Prérequis
You must have Visual Studio installed.
Contexte et remarques
Windows Mobile does not support tracing.
Open the TableViewer sample in Visual Studio.
Start Visual Studio and open the %SQLANYSAMP16%\SQLAnywhere\ADO.NET\TableViewer\TableViewer.sln.
Create an application file named App.config and copy the following configuration setup:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.diagnostics> <sources> <source name="iAnywhere.Data.SQLAnywhere" switchName="SASourceSwitch" switchType="System.Diagnostics.SourceSwitch"> <listeners> <add name="ConsoleListener" type="System.Diagnostics.ConsoleTraceListener"/> <add name="TraceLogListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="myTrace.log" traceOutputOptions="ProcessId, ThreadId, Timestamp"/> <remove name="Default"/> </listeners> </source> </sources> <switches> <add name="SASourceSwitch" value="All"/> <add name="SATraceAllSwitch" value="1" /> <add name="SATraceExceptionSwitch" value="1" /> <add name="SATraceFunctionSwitch" value="1" /> <add name="SATracePoolingSwitch" value="1" /> <add name="SATracePropertySwitch" value="1" /> </switches> </system.diagnostics> </configuration> |
Rebuild the application.
Click Debug » Start Debugging.
![]() |
Discuter à propos de cette page dans DocCommentXchange.
|
Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0 |