Check the IsExistingObject property to verify that the publication exists. If the value of this property is false, either the publication properties in step 3 were defined incorrectly or the publication does not exist.

Set the Name and DatabaseName properties for the publication, and set the ConnectionContext property to the connection created in step 1.

Check the IsExistingObject property to verify that the publication exists. If the value of this property is false, either the publication properties in step 3 were defined incorrectly or the publication does not exist.

Call the Remove method.

(Optional) If no other merge publications exist for this database, the database can be disabled for merge publishing as follows:

Create an instance of the ReplicationDatabase class. Set the ConnectionContext property to the instance of ServerConnection from Step 1.

Call the LoadProperties method. If this method returns false, verify that the database exists.