Workflow Trigger Considerations

See Also

If you plan to add your custom triggers or stored procedures to a workflow-enabled table, it is important to have a general understanding of how they work.

The order in which triggers are executed in SQL Server 7.0 is undefined. When adding custom triggers to your team solution, be aware that the order of the triggers is unpredictable. The workflow trigger created by Access Workflow Designer may execute before or after your custom triggers.

This may become a problem for your solution, because, in general, client components such as access data access pages test only the result of the first trigger execution. If the first trigger succeeds and the second trigger fails, the client consumes only the successful result of the first trigger and returns no error. In order to promote the error in the second trigger to the client, you should use the SET NOCOUNT ON option on the connection used to modify data in the database. This option hides successful trigger results and makes it possible for the first trigger error to reach the client.

For more information about working with triggers and stored procedures, see "Stored Procedures and Triggers" in the SQL Server Online Books.