Stopping ODBC Driver Manager Trace

Once you start tracing an ODBC connection with ODBC Driver Manager Trace, PocketBuilder continues sending trace output to the log file until you stop tracing. After you stop tracing, you must reconnect to have the changes take effect.

To stop tracing in a script, you can delete the ConnectOption parameter if it contains only trace parameters, or delete the SQL_OPT_TRACE options if ConnectOption contains other parameters.

You can also change the value of the SQL_OPT_TRACE parameter to SSQL_OPT_TRACE_OFF, as shown in the following example. This makes it easier to turn tracing on again later:

SQLCA.DBMS = "TRACE ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=Employee;UID=;PWD=',
ConnectOption='SQL_OPT_TRACE,SQL_OPT_TRACE_OFF;
SQL_OPT_TRACEFILE,C:\logs\odbctrc.log'"

To stop tracing in the development environment, you need to edit the database profile.

StepsTo stop ODBC Driver Manager Trace by editing the database profile:

  1. Open the Database Profile Setup dialog box for the connection you are tracing.

  2. On the Options tab, clear the Trace ODBC API Calls check box.

    If you supplied the pathname of a log file in the Trace File box, you can leave it specified in case you want to restart tracing later.

  3. Click OK in the Database Profile Setup dialog box.

  4. Right-click on the connected database and select Re-Connect from the dropdown menu in the Database Profiles dialog box.

    PocketBuilder connects to the database and stops tracing the connection.