Use Web API to Cancel Long-running Stored Procedure-based Data Lists

Version: This material pertains to version 3.0 of Blackbaud CRM SDK.

When using the AppFx Web API, you can now cancel calls to stored procedure-based data lists (non-CLR-based data lists). The AppFx web service DataListLoad method/operation now honors the .CancelID property for the DataListLoadRequest. After the DataListLoad method is canceled, it returns to the calling application as if it had normally completed. However, the API developer can inspect the DataListLoadCompletedEventArgs within the DataListLoadReply to verify the cancellation via the .DataListLoadWasCancelled property.

Note: A Web API code sample that demonstrates how to cancel a long-running stored procedure-based data list using the AppFxWebService can be found here.

Tip: If a data list takes a long time to load, the SQL may be inefficient or your overall feature may require a design change. Use SQL Server's Management Studio to analyze the query's execution plan. You may find there may be a better way to write the query. If the data list returns a large list of rows, you may want to change your overall feature's design. If your goal is to use the data list to process a bunch of data and return a result, you may want to use a business process to perform the processing.