Saturday, March 17, 2007

Guided Tour of Orcas's Sync Services Designer for SSCE

Nick Randolph, co-author of WROX's Professional Visual Studio 2005 and Microsoft Visual Developer/Device Application Development MVP , has published a two-part demonstration for using the Orcas March 2007 CTP's new Sync Designer that starts when you add a Local Database Cache (LocalDataCache1.sync) template to your project.

Part 1 stops at the Add New Item dialog that displays Local Database Cache and Service-based Database templates.

Part 2 continues with the Configure Data Synchronization and Configure Tables for Offline Use dialogs.

Note: For assistance with Sync Services and Sync Designer issues, I recommend the Microsoft Synchronization Services for ADO.NET forum. The Synchronizer blog and Rafik Robeal's SyncGuru site offer downloadable C# Sync Services sample projects, documentation, and commentary. Nick Randolph's SQL Server CE Portal site offers FAQs for SSCE and Sync Services, including a sample VB project that improves on Rafik Robeal's C# code for configuring Sync Services.

My Problems with the Sync Designer

The series is similar to a demonstration page that I put together last week for the Orders and Order_Details tables of the Northwind sample database. I didn't publish it to the blog because the Wizard failed at the last step.

As noted in steps 9 through 11 of my test drive:

9. Under Windows Vista running on Virtual Server 2003 R2 Beta 1, the Orcas Data Source Configuration Wizard creates NorthwindDataSet.xsd, .xsc, and .xss, but doesn't create the the NorthwindDataSet.Designer.vb file for a typed NorthwindDataSet. (This problem doesn't occur with the Orcas Data Source Wizard running under virtualized Windows Server 2003 R2.)

10. When I attempted to generate a typed data set from Northwind.sdf with the Data Source Configuration Wizard under virtualized Vista, I received this informative error message:

This message has nothing to do with SSCE. It also occurs when attempting to create a typed DataSet from SSCE or SQL Server [Express] with the Data Source Configuration Wizard under Vista in my configuration. A search for the error message returns a link to this even less informative suggestion from the MSDN Library: "Inspect the error message and check for any errors in the Task List (Visual Studio) that can be fixed."

11. I received this error message when attempting to save any changes, such as adding the DataRelationship between the Orders and Order Details tables to the DataSet Designer for the client SSCE database's typed DataSet. This exception occurs under virtualized Windows Vista and virtualized Windows Server 2003 R2:

12. I set the sync interval to 5 minutes, but was unable to detect any evidence that synchronization was occurring between the SSCE client and SSX server.

Subsequently, I wrote a Sync Services test harness to add the DataRelation for the client and a customized SyncGroup at runtime. A future blog post and Visual Studio Magazine article will provide more details on the test harness.

I plan to redo the test drive with virtualized Windows XP SP2 after I finish the test harness studies.

1 comments:

Nick Randolph said...

There is also more information available at http://www.sqlserverce.org on both SQL Server CE and MS Sync Services