Function OdbcTraceMode() Professional
Retrieves or sets the low-level trace mode of the ODBC driver manager.
OdbcTraceMode([<lTraceOn>]) --> lTraceModeThe function returns the current setting of the trace mode.
The ODBC driver manager provides a trace mechanism where every call to itself is recorded, including parameters and return states. This can be very helpful for troubleshooting and for enhancements to the ODBCDBE as well. The output will be written to a file which can be named by OdbcTraceFile().
// This sample shows how to 
// create a trace file of ODBC calls. 
PROCEDURE MAIN(cConnect) 
LOCAL oSession 
LOCAL cPrevTraceFile 
   cPrevTraceFile := OdbcTraceFile("myodbc.log") 
   // don't trace the connection calls 
   OdbcTraceMode(.F.) 
   oSession := DacSession():new( cConnect ) 
   IF oSession:isConnected() 
      // only trace the USE 
      OdbcTraceMode(.T.) 
      USE test NEW 
      DbSkip() 
      USE test NEW 
      DbSkip() 
      CLOSE ALL 
      OdbcTraceMode(.F.) 
   ENDIF 
   OdbcTraceFile(cPrevTraceFile) 
RETURN 
PROCEDURE DbeSys 
   DbeLoad( "ODBCDBE" ) 
   DbeSetDefault( "ODBCDBE" ) 
RETURN 
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.
