Demo I: Offline Application – SyncAdapterBuilder


This is the first demo application to demonstrate building offline application using Synchronization Services for ADO.NET framework. I have more demo ideas in mind and I will post more demos in the following weeks. Feel free to make any suggestions ..

Download the CTP: Microsoft Synchronization Services for ADO.NET CTP release

Overview of the demo

The demo shows how to build offline application using Synchronization 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?

  • Two-Tier 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, auditing..etc)

How to install OfflineAppDemo application?

  1. Fire SQL server and load demo.sql file
  2. Execute the script until the “test sample” marker
  3. Load VS solution (OfflineAppDemo-Builder Project)
  4. Build the project
  5. You are ready to go

Download Sample

Update: Just to let you know, I left Microsoft to start a new company, Raveable Hotel Reviews. See Examples: Romantic Hotels in Myrtle Beach, Top 10 Hotels in Seattle,Best Hotels in Miami, Best Hotels in San Francisco, Hotels with in-room jacuzzi and Best Hotels in Los Angeles. Your feedback is welcome on twitter.com/raveable, raveable blog 

Comments (10)

  1. So little time, so much cool new technology to play with .

  2. Bill_Ryan says:

    Totally rockin Rafik – thanks!

  3. Bill_Ryan says:

    Totally rockin Rafik – thanks!

  4. Q: Are there any demos/samples available A: Yes, the Synchronizer blog has a number of great getting

  5. Over the last couple of days I have been putting together some sample code that will significantly reduce

  6. ccoonen says:

    Excellent example, this is going to save a lot of bandwidth, time, energy and aggravation!

  7. ccoonen says:

    WOWSERS! I just tried it out with BLOB Data (type image) and It rendered the Image inside the Cell. This is unbelievable – good work!

  8. MSDN Archive says:

    Hi there,

    I am glad you like it. Make sure to check the forum, lots of great discussions there too 🙂

    Thanks a lot!

    Rafik

  9. giancarlocorrea says:

    I download the solution, and I tried to compile, but there is no "clientdb.sdf" file. How can I do create this database for compile the application? I have another question too. I’m using SQL Server 2005 Express, have any problem?

  10. MSDN Archive says:

    Hi,

    The project should compile without issues. The clientdb.sdf is created the first time you click ‘Synchronize’

    If you are using SQL Server Express as the server side, there should be no issues.

    Thanks