Publication Property

SqlCeReplication.Publication Property

Specifies the SQL Server publication name that has been enabled for SQL Server Compact Edition subscribers.

Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in

public string Publication { get; set; }
/** @property */
public String get_Publication ()

/** @property */
public void set_Publication (String value)

public function get Publication () : String

public function set Publication (value : String)

Not applicable.

Property Value

The name of the Publication.

This is a required property.

The following example sets the Publication property of the SqlCeReplication object.

SqlCeReplication repl = null;

    // Instantiate and configure SqlCeReplication object
    repl = new SqlCeReplication();
    repl.InternetUrl = "";
    repl.InternetLogin = "MyInternetLogin";
    repl.InternetPassword = "<password>";
    repl.Publisher = "MyPublisher";
    repl.PublisherDatabase = "MyPublisherDatabase";
    repl.PublisherLogin = "MyPublisherLogin";
    repl.PublisherPassword = "<password>";
    repl.Publication = "MyPublication";
    repl.Subscriber = "MySubscriber";
    repl.SubscriberConnectionString = "Data Source=MyDatabase.sdf";

    // Create a local SQL Mobile Database subscription

    // Synchronize to the SQL Server database
catch (SqlCeException)
    // Handle errors here
    // Dispose the repl object

Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows XP Professional x64 Edition, Windows XP SP2

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

© 2015 Microsoft