views:

20

answers:

0

I am using transaction replication with push subscription. I am developing a UI for replication using RMO in C#.NET between different instances of the same database within same machine holding similar schema and structure. I am using Single subscriber and multiple publisher topology. During creation of publication i want to set a few article properties such as Keep the existing object unchanged ,allow schema changes at subscriber to false a,copy foriegn key constarint and copy check constraints to true. How do i set the article properties using RMO in C# .NET. I am using Visual Studio 2008 SP1.I also want to know as how we can select all the objects including Tables,Views,Stored Procedures for publishing at one stretch. I could do it for one table but i want to select all the tables at one stretch. This is the code snippet i used for selecting single table for publishing.

TransArticle ta = new TransArticle();
ta.Name = "Article_1";

ta.PublicationName = "TransReplication_DB2";
ta.DatabaseName = "DB2";

ta.SourceObjectName = "person";
ta.SourceObjectOwner = "dbo";

ta.ConnectionContext = conn;
ta.Create();