Login or Sign Up to become a member!
LessThanDot Site Logo


Community Wiki

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.


Google Ads

RMO Enum all subscriptions

From Wiki

Jump to: navigation, search

Use this base method to return a Data Table of all the subscriptions for a publication

  1. public DataTable EnumSubscriptions()
  2.         {
  3.             try
  4.             {
  5.                 ServerConnection publisher = new ServerConnection(<distributor instance>);
  6.                 PublicationMonitor publicationMonitor = new PublicationMonitor();
  7.                 publicationMonitor.Name = <publication name>;  
  8.                 publicationMonitor.DistributionDBName = <distributor database name>;  
  9.                 publicationMonitor.PublisherName = <distributor instance>;
  10.                 publicationMonitor.PublicationDBName = <publication database name>;  
  11.                 publicationMonitor.ConnectionContext = publisher;
  14.                 DataSet ds_subscriptions = publicationMonitor.EnumSubscriptions();
  15.                 return ds_subscriptions.Tables[0];
  16.             }
  17.             catch (Exception ex)
  18.             {
  19.                 throw new ApplicationException(
  20.                     "The publication property could not be changed.", ex);
  21.             }
  22.         }

--onpnt 01:51, 30 December 2010 (GMT)

815 Rating: 2.0/5 (30 votes cast)