Share via


DropSubscription Method (Replication ActiveX)

The DropSubscription method drops the subscription having the specified control properties.

Syntax

object.DropSubscription DBDropOption
Part Description

object

Expression that evaluates to an object in the Applies To list.

DBDropOption

Option to drop; use a value from DBDROPOPTION (Replication ActiveX).

Return Value

Return code Description

S_OK

Method succeeded.

E_FAIL

General failure occurred. Check error records for detailed information.

REPLX_E_SUBNOTFOUND

Specified subscription does not exist.

REPLX_E_RETRYFAILURE

Failure occurred that might require retrying the last operation.

Applies To

SQLDistribution Object (Replication ActiveX)

SQLMerge Object (Replication ActiveX)

Remarks

Push subscriptions are not currently supported by this method.

The Initialize Method (Replication ActiveX) should not be called prior to using DropSubscription.

If DROP_DATABASE is specified, the database is dropped even when the subscription specified by the SubscriptionName Property (Replication ActiveX) property does not exist. Error notification is not provided.

DropSubscription also supports dropping the subscription without dropping the database.

In Microsoft Visual Basic, DropSubscription is a Sub method and does not return a value.

Prototype C/C++

HRESULT DropSubscription(
     DBDROPOPTION DBDropOption); 

See Also

Reference

AddSubscription Method (Replication ActiveX)
CopySubscription Method (Replication ActiveX)
DBDROPOPTION (Replication ActiveX)
SubscriptionName Property (Replication ActiveX)

Help and Information

Getting SQL Server 2005 Assistance