Applications call the DropSubscription method to drop a subscription to a SQL Server publication and optionally delete the SQL Server Compact 3.5 database from the device.
object.DropSubscription(DBDROPOPTION)
Applies To
SQL Server Compact 3.5 Replication object
Generic Parameters
Parameter |
Description |
---|---|
DBDROPOPTION |
Specifies whether to delete or leave the SQL Server Compact 3.5 database |
DBDROPOPTION Parameter
DBDROPOPTION specifies whether to delete or leave the SQL Server Compact 3.5 database. It is optional.
Constant |
Value |
Description |
---|---|---|
LEAVE_DATABASE |
0 |
Deletes the replication system tables and three replication system columns in the user tables, but does not delete the database. |
DROP_DATABASE |
1 |
Deletes the SQL Server Compact 3.5 database (default). |
Prototype
HRESULT DropSubscription(DBDROPOPTION DBDropOption);
Returns
Return code |
Description |
---|---|
S_OK |
Method succeeded. |
Any FAILED(HRESULT) |
See the SSCEErrors collection for detailed error information. |
See SSCEErrors Collection for detailed error information.
If you use the LEAVE_DATABASE option with the DropSubscription method, all referential integrity (R/I) is removed from replicated tables and must be manually replaced if it is required.
If the SQL Server Compact 3.5 database is a subscriber to multiple publications, the Publisher Property (Replication), Publication Property (Replication), and PublisherDatabase Property (Replication) must be set before calling the DropSubscription method.