Function OdbcWriteDebug() Professional
Write the OdbcDebug() results to a file
OdbcWriteDebug([<aoSession>], [<cFile>]) --> lSuccess
If the file could be cretaed, the function returns .T.
The function calls OdbcDebug() and writes the output to the file <cFile>. If the <cFile> already exists, the function will append the information to the existing file. Otherwise, a new file is created.
// This sample shows how to
// write the current ODBCDBE settings
// to a file for debugging purposes.
PROCEDURE MAIN(cConnect)
LOCAL oSession
LOCAL cPrevTraceFile
cPrevTraceFile := OdbcTraceFile("myodbc.log")
OdbcTraceMode(.T.)
oSession := DacSession():new( cConnect )
IF !oSession:isConnected()
OdbcWriteDebug(oSession, "myodbc.log")
ELSE
USE test NEW
? FieldGet(1)
CLOSE
ENDIF
OdbcTraceMode(.F.)
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.