|SQL_ATTR_TRACE (ODBC 1.0)|An SQLUINTEGER value telling the Driver Manager whether to perform tracing:<br /><br /> SQL_OPT_TRACE_OFF = Tracing off (the default)<br /><br /> SQL_OPT_TRACE_ON = Tracing on<br /><br /> When tracing is on, the Driver Manager writes each ODBC function call to the trace file. **Note:** When tracing is on, the Driver Manager can return SQLSTATE IM013 (Trace file error) from any function. <br /><br /> An application specifies a trace file with the SQL_ATTR_TRACEFILE option. If the file already exists, the Driver Manager appends to the file. Otherwise, it creates the file. If tracing is on and no trace file has been specified, the Driver Manager writes to the file SQL.LOG in the root directory.<br /><br /> An application can set the variable **ODBCSharedTraceFlag** to enable tracing dynamically. Tracing is then enabled for all ODBC applications currently running. If an application turns tracing off, it is turned off only for that application.<br /><br /> If the **Trace** keyword in the system information is set to 1 when an application calls **SQLAllocHandle** with a *HandleType* of SQL_HANDLE_ENV, tracing is enabled for all handles. It is enabled only for the application that called **SQLAllocHandle**.<br /><br /> Calling **SQLSetConnectAttr** with an *Attribute* of SQL_ATTR_TRACE does not require that the *ConnectionHandle* argument be valid and will not return SQL_ERROR if *ConnectionHandle* is NULL. This attribute applies to all connections.|
0 commit comments