Initialize Method

Replication Programming

Replication Programming

Initialize Method

The Initialize method validates the control properties and establishes all database connections.

Applies To

SQLDistribution Object

SQLMerge Object

SQLSnapshot Object



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

Control properties that define the Publisher, publication, Distributor, and Subscriber (for the Distribution and Merge controls) must be set before calling Initialize.

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

Initialize should not be called prior to using the AddSubscription method to add a new subscription, or prior to using the DropSubscription method to drop an existing subscription.

Prototype (C/C++)

HRESULT Initialize( );

Return code Description
S_OK Method succeeded.
E_FAIL General failure occurred. Check error records for detailed information.
REPLX_E_DBNOTFOUND Specified database does not exist.
REPLX_E_SUBNOTFOUND Specified subscription does not exist (SQLDistribution and SQLMerge objects only).
REPLX_E_SUBEXPIRED Subscription has expired (SQLDistribution and SQLMerge objects only).
REPLX_E_PROFILENOTFOUND Specified profile does not exist.
REPLX_E_RETRYFAILURE Failure occurred that might require retrying the last operation.

See Also

Developing Replication Applications Using ActiveX Controls