Click here to Skip to main content
13,046,533 members (73,646 online)
Click here to Skip to main content


252 bookmarked
Posted 15 Mar 2007

Take Data Offline Using Microsoft Synchronization Services for ADO.NET

, 11 Jan 2008
Build occasionally connected applications using Microsoft Synchronization Services for ADO.NET
OfflineAppDemo Sample Application

This application demonstrate how to build offline application using Synchrnoization Services for ADO.NET library
In this sample, two tables (orders, order_details) are at the server database and we would like to take the 
content offline and make some updates to client and server content then synchronize the changes.

What is demonstrated in this sample?
- 2-Teir sync scenario where client have direct access to server database through ADO connection object
- Setting up the server tables for bidirectional sync
- Using SqlSyncAdapterBuilder to create SyncAdapter for each table we want to sync
- Using SQLCE to cache content on the client 
- Showing sync progress

What is not demonstrated in this sample?
- N-Tier scenrio where the client connects to middle tear and does not have access to the server DB
- Handling Conflicts
- Manual creation of the SyncAdapter objects
- Creating custom schema on the server 
- Inspecting inflight DataSet (for any custom logic, auditting..etc)

How to install OfflineAppDemo application?

1- Fire SQL server and load demo.sql file
2- Execute the script untill the "test sample" marker

3- Load VS solution (OfflineAppDemo-Builder Project) 
4- Build the project 
5- You are ready to go

- The client db is not created until the first sync with the server there fore making any random operations will result in error message.

� 2007 Microsoft Corporation.  All rights reserved.  This OfflineApp Demo Sample Application (and all documentation, code and samples included with this application) is provided AS IS, WITHOUT WARRANTY OF ANY KIND, is for informational purposes only, and is subject to the terms specified at

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Rafik Robeal
Chief Technology Officer
United States United States
Entrepreneur, developer and then some. I started Raveable Hotel Reviews in 2008 to help travelers find the best hotel for their vacation with no history of bed bug reports (hint: don't go new york without checking bed bugs in NYC hotels page), cases of personal property theft, or food poisoning incidents.

Prior to, I was a development lead at Microsoft Corporation. I led the team developing the next generation social networking for Windows Mobile. Before that I played leading role in the design and development of Microsoft Sync Framework, Sync Services for ADO.NET, SQL Server Replication and Windows File Replication.

My Company: Raveable Hotel Reviews
My Sync Blog: The Synchronizer
My Sync WebSite:

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 11 Jan 2008
Article Copyright 2007 by Rafik Robeal
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid