SQL Server 2008 R2

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

  1. 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.

  2. In Object Explorer, expand the SQL Server Compact 3.5 database node, expand Replication, right-click Subscriptions, and then choose New Subscriptions.

  3. On the Introduction page, click Next.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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.