Cancel Method (Replication)
Applications call the Cancel method to cancel a currently-running synchronization.
Syntax
object.Cancel()
Applies To
SQL Server 2005 Compact Edition Replication object
Prototype
HRESULT Cancel();
Returns
Return code | Description |
---|---|
S_OK |
Method succeeded. |
Any FAILED(HRESULT) |
See the SSCEErrors collection for detailed error information. |
Remarks
When synchronization is started, it runs synchronously. The Cancel method can be run from a different thread or from a user implementation of the Replication Status Reporting Interface.
If the Cancel method is called, the cancellation behavior depends on which stage of synchronization is currently processing, according to the following list of conditions:
If synchronization is canceled... | ...this behavior occurs |
---|---|
During the upload stage, before the .IN message is complete and before the SQL Server Reconciler has been invoked |
The synchronization is completely canceled. |
After the .IN message is complete and the SQL Server Reconciler has been invoked |
Only the download part of the synchronization is canceled. The .OUT message is generated but is not downloaded and is eventually deleted during the cleanup process. |
After the .OUT message has been created and is being downloaded |
Some of the changes may be consumed, but not necessarily all of them. |
See Also
Reference
Replication Status Reporting Interface