UPDATE with OUTPUT clause – Triggers – and SQLMore. Results – Microsoft SQLCAT ISV Program Management Team. NOTE: the code in this BLOG is TSQL instead of ODBC calls. The OUTPUT clause is very useful in providing data back to the application regarding the row, or rows, which were updated (or: inserted / deleted). This worked well, until an external Partner application added a trigger to the table listed in the UPDATE statement. Example: CREATE TRIGGER .
There are two different methods of getting OUTPUT data from an UPDATE statement. This option cannot have a trigger defined on the table.
This option must be used if there is any possibility the table will have a trigger on it at any point.? If you guessed that additional results are returned you are correct.
The ODBC code returned data in a loop utilizing the following API calls: SQLFetch, SQLNum. Result. Cols, SQLRow. Count, SQLMore. Results.
When a Transact-SQL trigger.
Using Triggers In MS SQL Server. Triggers allow us to execute a batch of SQL code when either an insert, update or.