Details Version:. File Name:. Date Published:. File Size:. System Requirements Supported Operating System. Do one of the following: To start the extraction immediately, click Open or Run this program from its current location and specify an extraction location on your computer. To copy the download to your computer for extraction at a later time, click Save or Save this program to disk and specify a location to save the.
Files larger than 1 GB may take much longer to download and might not download correctly. You might not be able to pause the active downloads or resume downloads that have failed. SQL Server Compact 3. Details Note: There are multiple files available for this download. Once you click on the "Download" button, you will be prompted to select the files you need. File Name:. Date Published:. File Size:. System Requirements Supported Operating System.
Click on the bit or the bit Download button on this page to start the download, or choose a different language from the drop-down list and click Go.
Do one of the following: To start the installation immediately, click Open or Run this program from its current location. To copy the download to your computer for installation at a later time, click Save or Save this program to disk. For more information about installing the IIS 6. Synchronization Services for ADO. While installation is easy, the configuration of merge replication takes some careful consideration.
When designing the application, it is important to take a step back and examine how the various moving parts interact with each other. In the sample inventory application, the Northwind database on a back-end SQL Server instance is the central data store containing all information including products, orders, and customers.
The application allows handheld devices to store the inventory information from the Northwind database on the back-end database server.
Essentially, it allows the two databases to communicate with each other using the HTTP protocol to relay messages. A more advanced approach is do it manually. The NTFS folder permissions and the virtual directory should allow the handheld application to access the agent. Again, anonymous access is great for sample applications, but you'll need a more secure authentication method in real apps. For more information on connectivity and security see Configuring Security for Connectivity.
Initially, a publication must be created on the SQL Server back end to define the parameters of the merge replication process. The publication defines the data that will be available, and how to resolve any potential replication conflicts. The publication access list defines who's allowed to subscribe to it. The type of authentication used to subscribe is defined by the SQL Server configuration. A publication can be created by starting the Create Publication Wizard, which can be accessed by right-clicking a database and selecting New Publication from the pop-up menu.
Most of the wizard is intuitive, so I will concentrate on the more critical settings. There are three types of publications that can be created: snapshot, transactional, and merge see Figure 1. Since the inventory app must allow either the back-end database or the handheld's database to update the data and synchronize with each other, a merge publication best fits the bill. The next step of the wizard is to indicate what type of subscribers are allowed to subscribe to the publication.
An article can be a table, view, or even a stored procedure. For the sample application I chose to publish all of the information for simplicity; however, a subset of the tables would be adequate since the only information that I intend for the handheld device to use is related to inventory.
An index along with the rowguid column, defined as type uniqueidentifier, will be added when the first snapshot of the publication is taken.
The uniqueidentifier value is automatically generated for new rows in the article. The uniqueidentifier value is used to link rows of the back-end database's article to those of the SQL Server CE article. Publications can also filter the article vertically limiting columns in the article or horizontally limiting rows in the article.
This can be done set either through the Create Publication Wizard or through the properties of the publication. For this sample application, I did not create any filters and I also specified that all tables become published articles.
Once the wizard completes, it then creates the publication. When the publication is created, SQL Server also creates several other objects behind the scenes to support the replication process. For example, triggers are created on all published articles that will track changes made to the articles on the server. These views, triggers, and tables are created to support the replication process that is defined by the publication. There, I added the SqlTestUser to the list of valid accounts that can access the publication see Figure 2.
The final step is to create the first snapshot. Before a new subscriber can accept changes, it must contain all of the tables and data contained in the publication's defined articles. This means that the first time you create a snapshot and then replicate it to the subscriber, all database tables will be created and filled in the subscriber's database in this case, the SQL Server CE database.
On subsequent synchronizations, only modifications are sent between the publisher and subscriber databases. Once the SQL Server CE Server Agent is set up, the publication has been created, all types of authentication have been defined, and the initial snapshot has been established, the replication process can begin.
Now all I need is a subscriber. Enter the sample inventory application. The Inventory application is a Smart Device application written in C. The application's basic requirements include synchronizing the inventory data from the Northwind back-end database with the handheld device. When a product is selected, its price and inventory levels are displayed in textboxes so the user can edit them.
One of the great features of developing with the. Instead, you can develop and debug using the Pocket PC emulator. The figures shown in this column are of the application running in debug mode in the emulator.
The first time the application is run the data has not yet been replicated over to SQL Server CE, so the input boxes are empty.
0コメント