Symptom
How do I debug ODBC connection issues and see what CR is sending to the ODBC Client?
Resolution
Resolution
ODBC Trace allows you to record all ODBC activity in a log file. It is enabled in the following manner:
- Open the ODBC Administrator.
- Click on the "Tracing" tab.
- Choose a destination for the log file by clicking on the "Browse" button and click "Apply".
- Click on "Start Tracing Now".
- Perform the desired action(s) in the Crystal Report Designer.
- Go back to the ODBC Administrator.
- Click on the "Tracing" tab.
- Click on "Stop Tracing Now".
- Open the .log file that was created by ODBC Trace. You will see pairs of function calls, like this:
crw32 fff8ce63-fff8 ENTER SQLGetData
crw32 fff8ce63-fff8 EXIT SQLGetData with return code 0 (SQL_SUCCESS)
Notice that there are two parts to the function call: "ENTER" and "EXIT". "ENTER" indicates that the application is making the call, whereas "EXIT" returns the result of the function call. The "crw32" represents the application that is making the ODBC function call; in this case, it"s Crystal Reports. "SQLGetData" represents the function call that is being made.
The "return code" is the result of the function call. It is important to know whether the function call was successful or not. The log file will also contain additional information returned by each function call. The rest of the information displayed in the log is not significant for the purposes of this module. For more information on values returned by each function call, refer to the ODBC Software Developer"s Kit.
Keywords
H o w t o u s e O D B C T r a c e ? , 3 6 5 6 2 7 9 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To