ReInitializeSubscription Method (Replication)

Applications call the ReInitializeSubscription method to mark a subscription for reinitialization. After calling the ReInitializeSubscription method, the application must call the Initialize, Run, and Terminate methods to download the latest snapshot of the publication to the Microsoft Windows CE-based device.

Syntax

object.ReInitializeSubscription(UploadBeforeReinit)

Applies To

SQL Server Compact 3.5 (SQL Server Compact 3.5) Replication object

Generic Parameters

Parameter Description

UploadBeforeReinit

Determines whether changes in a subscription are uploaded to the Publisher before the snapshot is applied at the Subscriber

UploadBeforeReinit

The UploadBeforeReinit parameter determines whether changes in a subscription are uploaded to the publisher before the snapshot is applied at the Subscriber.

If True, the changes in the subscription database are uploaded to the Publisher before the snapshot is applied at the Subscriber. If False, the changes are not uploaded. The default is False.

Prototype

HRESULT ReInitializeSubscription(VARIANT_BOOL UploadBeforeReinit);

Returns

Return code Description

S_OK

Method succeeded.

Any FAILED(HRESULT)

See the SSCEErrors collection for detailed error information.

Remarks

A flag is marked in the subscription system table in SQL Server Compact 3.5 to signify that during the next synchronization, the subscription should be reinitialized. After calling the ReInitializeSubscription method, the application must then call the Initialize, Run, and Terminate methods to update the existing subscription of the publication.

If the SQL Server Compact 3.5 database is a subscriber to multiple publications, the Publisher, Publication, and PublisherDatabase properties must be set before calling the ReInitializeSubscription method.

See Also

Other Resources

Replication Object Methods

Help and Information

Getting Assistance (SQL Server Compact 3.5 Service Pack 1)