1197937 - How to use ODBC Trace?

SAP Knowledge Base Articles - public

1197937 - How to use ODBC Trace?


How do I debug ODBC connection issues and see what CR is sending to the ODBC Client?



ODBC Trace allows you to record all ODBC activity in a log file.  It is enabled in the following manner:

  1. Open the ODBC Administrator.
  2. Click on the "Tracing" tab.
  3. Choose a destination for the log file by clicking on the "Browse" button and click "Apply".
  4. Click on "Start Tracing Now".
  5. Perform the desired action(s) in the Crystal Report Designer.
  6. Go back to the ODBC Administrator.
  7. Click on the "Tracing" tab.
  8. Click on "Stop Tracing Now".
  9. 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.


How to use ODBC Trace? , 3656279 , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , How To


SAP Crystal Reports, developer version for Microsoft Visual Studio