Jaa


How to: View and Modify Push Subscription Properties (RMO Programming)

You can modify push subscriptions and access their properties programmatically by using Replication Management Objects (RMO). The RMO classes you use to view or modify push subscription properties depend on the type of publication to which the push subscription is subscribed.

To view or modify properties of a push subscription to a snapshot or transactional publication

  1. Create a connection to the Publisher by using the ServerConnection class.

  2. Create an instance of the TransSubscription class.

  3. Set the PublicationName, DatabaseName, SubscriberName, and SubscriptionDBName properties.

  4. Set the ServerConnection from step 1 for the ConnectionContext property setting.

  5. Call the LoadProperties method to get the properties of the object. If this method returns false, either the subscription properties in step 3 were defined incorrectly or the subscription does not exist.

  6. (Optional) To change properties, set a new value for one of the TransSubscription properties that can be set, and then call the CommitPropertyChanges method.

  7. (Optional) To view the new settings, call the Refresh method to reload the properties for the subscription.

To view or modify properties of a push subscription to a merge publication

  1. Create a connection to the Subscriber by using the ServerConnection class.

  2. Create an instance of the MergeSubscription class.

  3. Set the PublicationName, DatabaseName, SubscriberName, and SubscriptionDBName properties.

  4. Set the ServerConnection from step 1 for the ConnectionContext property setting.

  5. Call the LoadProperties method to get the properties of the object. If this method returns false, either the subscription properties in step 3 were defined incorrectly or the subscription does not exist.

  6. (Optional) To change properties, set a new value for one of the MergeSubscription properties that can be set, and then call the CommitPropertyChanges method.

  7. (Optional) To view the new settings, call the Refresh method to reload the properties for the subscription.

See Also

Tasks

How to: Create a Push Subscription (RMO Programming)
How to: Delete a Push Subscription (RMO Programming)
How to: View and Modify Push Subscription Properties (Replication Transact-SQL Programming)

Other Resources

Subscribing to Publications

Help and Information

Getting SQL Server 2005 Assistance