Since we only had a limited amount of time for content that really deserved sessions of their own, we had a lot to cover and had to be fairly high level without the ability to drill down into the demos. For the client caching half I covered the use of SQL Mobile Remote Data Access as well as SQL Server Merge Replication. RDA is only available with the SQL Mobile platform, however SQL Mobile now runs on the Tablet PC and is no longer restricted to the CE/Pocket PC platform. This is a huge advantage to developers that are writing mobile apps that span device and Tablet PC as they can no write one set of data access code and use a single database across these two very different platforms.
Merge replication is actually available for both SQL Mobile as well as SQL Express. Due to limited time I didn’t have time to demo both SQL Express as well as SQL Mobile, however the merge replication scenario is just as useful with SQL Express.
This demo uses SQL Mobile and Remote Data Access to pull a customer table from a remote database. This sample is fairly simple and demonstrates the very basic things you need to know to leverage RDA. To configure RDA please use the SQL Books Online to configure the web server to proxy your RDA queries to your OleDB database.
SQL Mobile with Replication
This demos is similar to the RDA sample above except that it uses SQL Server Merge Replication. The demo is fairly simplistic but covers the basics to leverage Merge Replication.
When attempting to verify your application is the correct version the question must be asked, which version number are you talking about? Since RTM we have File Version and Assembly Version. With ClickOnce we now have a Deployment version. This sample simply shows the different API’s to call for each.
Where did your data files go? With ClickOnce we have yet another location to place data files. There are several different API’s to identify a Data Directory but they aren’t always accessible. This demo simply shows several of the key API’s:
- My.Application.Deployment.DataDirectory AKA System.Deployment.Application.ApplicationDeployment.CurrentDeployment.DataDirectory
Occasionally Connected ClickOnce w/Replication
This is the more complete scenario. This is also a finished version of the sample I presented in a Yukon Webcast several weeks earlier. In this demo I essentially demonstrate how to deploy a custom app that leverages the Outlook 2003 model for syncing. As long as the app has network connectivity the server used for Database Syncing and Application Updates, the application will constantly sync any database changes from the client to the server. Once a sync is completed the application will check the database for the required application version. If the version of the app in the database is newer then the currently deployed version on the users desktop, the application will download updates using the ClickOnce API’s. All of this happens on a background thread so the user can continue to interact with their application while the sync operations happen behind the scenes.
• ClickOnce API’s
• SQL Mobile
• SQL Server Merge Replication