The ODBC Driver Manager is capable of generating Visual Studio Analyzer events. You can use these events to trace Open Database Connectivity (ODBC) activity within your application.
Other Microsoft-supplied technologies are also capable of generating Visual Studio Analyzer events; see Microsoft Components That Generate Visual Studio Analyzer Events for a complete list.
You must configure ODBC to generate Visual Studio Analyzer events before you can view any of the events it generates.
To configure ODBC to generate Visual Studio Analyzer events
Visual Studio Analyzer Events Generated by the ODBC Driver Manager
Event | Description |
Call | Generated on every ODBC API entry. |
ReturnException | Generated on every ODBC API return if the return code is SQL_ERROR. |
ReturnNormal | Generated on every ODBC API return if the return code is not SQL_ERROR. |
Connection Start | Indicates that a connection started; generated when the ODBC Driver Manager calls the driver's connection APIs. |
Connection Complete | Indicates that a connection completed; generated when the driver's connection APIs return to the ODBC Driver Manager. |
Disconnect Start | Generated when the ODBC Driver Manager calls the driver's SQLDisconnect function. |
Disconnect Complete | Generated when the driver's SQLDisconnect function returns to the ODBC Driver Manager. |
QuerySend | Generated when the ODBC Driver Manager calls the driver's SQLPrepare, SQLExecute, SQLExecDirect, and catalog functions such as SQLTables and SQLColumns. |
QueryResult | Generated when the driver returns a resultset to the ODBC Driver Manager for functions involving queries. |
TransactionStart | Generated when an application sets the value of SQL_ATTR_AUTOCOMMIT to SQL_AUTOCOMMIT_OFF, or after an application successfully calls SQLEndTran. |
TransactionCommit | Generated when an application calls SQLEndTran to commit a local transaction. |
TransactionRollback | Generated when an application calls SQLEndTran to roll back a local transaction. |
JoinDTC | Generated when an application joins the Distributed Transaction Coordinator (DTC). |
LeaveDTC | Generated when an application leaves the Distributed Transaction Coordinator (DTC). |