SQLMergeClass  是在SqlServer2000中用代码创建请求和匿名订阅的工具类使用前先要引用:sqlmergx.dll我需要有人能将里面所有的方法的描述和作用贴出来.

解决方案 »

  1.   

    http://support.microsoft.com/kb/319646/zh-cnmsdn上有说明的...还有代码
      

  2.   

    try{string strPublisher, strDistributor, strSubscriber, strPublisherDatabase, strSubscriberDatabase, strPublication;strPublisher = "Pluto"; // name of your publisherstrDistributor = "Pluto"; // name of your distributorstrSubscriber = Environment.MachineName+"\\MSDE"; // name of your subscriberstrPublication = "TestConf";strPublisherDatabase = "TestConf";strSubscriberDatabase = "TestConf";SQLMergeClass oMerge = new SQLMergeClass();//Set up the Publisher.oMerge.Publisher = strPublisher;oMerge.PublisherSecurityMode = SQLMERGXLib.SECURITY_TYPE.NT_AUTHENTICATION;oMerge.PublisherDatabase = strPublisherDatabase;oMerge.Publication = strPublication;//Set up the Distributor.oMerge.Distributor = strDistributor;oMerge.DistributorSecurityMode = SQLMERGXLib.SECURITY_TYPE.NT_AUTHENTICATION;//Set up the Subscriber.oMerge.Subscriber = strSubscriber;oMerge.SubscriberDatasourceType = 0;oMerge.SubscriberDatabase = strSubscriberDatabase;oMerge.SubscriberSecurityMode = SQLMERGXLib.SECURITY_TYPE.NT_AUTHENTICATION;//Set up the subscription.oMerge.SubscriptionType = SQLMERGXLib.SUBSCRIPTION_TYPE.ANONYMOUS;oMerge.SynchronizationType = SQLMERGXLib.SYNCHRONIZATION_TYPE.AUTOMATIC;// oMerge.SubscriptionName = "PullMergeSubscription";//Create the database and subscription.oMerge.AddSubscription(SQLMERGXLib.DBADDOPTION.CREATE_DATABASE, SQLMERGXLib.SUBSCRIPTION_HOST.NONE);//Synchronize the subscription. Console.WriteLine("Starting synchronization...");oMerge.Initialize();oMerge.Run();oMerge.Terminate();Console.WriteLine("Synchronization completed.");}catch (Exception e){Console.WriteLine(e.StackTrace);Console.WriteLine(e.Message);}