In this topic, you will create a new Microsoft SQL Server Compact 3.5 subscription to an existing SQL Server 2008 R2 publication. This topic assumes that you have created a publication and configured that publication for SQL Server Compact 3.5 subscribers.
To creating a new subscription
From within SQL Server Management Studio, connect to an instance of a SQL Server Compact 3.5 database. This database can be running on a connected device, or it can be a file on the desktop computer.
In Object Explorer, expand the SQL Server Compact 3.5 database node, expand Replication, right-click Subscriptions, and then choose New Subscriptions.
On the Introduction page, click Next.
On the Choose Publication page, in the Publisher drop-down list, choose <Find SQL Server Publisher>. Choose the Publisher and then click Connect. In the Publications list, select the publication, and then click Next.
On the Identify Subscription page, type a name for the subscription. If the publication to which you are subscribing uses dynamic filtering, provide a HOST_NAME value for this database, and then click Next.
On the Web Server Authentication page, type the URL to the virtual directory that contains the SQL Server Compact 3.5 Server tools, provide the authentication information, and then click Next. For more information about configuring a virtual directory, see How to: Configure Connectivity with the Configure Web Synchronization Wizard.
On the SQL Server Authentication page, select the type of SQL Server Authentication required to connect to SQL Server, provide the user name and password, if it is required, and then click Next.
On the Complete the Wizard page, you can select and copy the sample code to use in a C# or Visual Basic application. Click Finish to create the subscription. When the process is completed, click Close.