What are some good ways to distribute data from an internet datasource to an embedded database?
This is my first post to stackoverflow, so bear with me. :)
I am developing a winforms application that will have an offline mode, so that it can access the data if an internet connection (or more accurately, a connection to my WCF service) cannot be established. I have decided to utilize SQL Server Compact edition on the client side of the application & was wondering what the general consensus is on the "best" practice for making the client application (Sql Server Compact) subscribe to the master database (MSSQL 2008).
The approach that I was planning on using works like so:
- Management enters information into a web based administration panel that I developed and is stored in a MSSQL 2008 database.
- After adding / modifying information, they can click a release "datapack" button which will increment a "datapack" version number, which will later be used by the client application to determine if they are in sync or not.
- When the client application is started, it connects to the internet and determines if the version numbers are in sync. If not, it pulls the information from the server.
That third step is where I'm a bit lost I thought about simply developing a web service that will expose a dataset containing all of the data and just iterating through it doing inserts, but that seems terribly inefficient to me. The full database probably wouldn't amount to much more than 5 MB total, so that led me to think it would be great if when management clicks the release datapack button, it would store the database in a file that could simply be downloaded and would replace the embedded database. Again, I'm a little lost on how that would work.
This is my first time working with an embedded data开发者_开发问答base, most of my work has been web/win apps that have real-time access to the data.
Think anyone can shed some light on the issue?
I would first take a look at the Microsoft Sync Framework.
Introduction to Microsoft Sync Framework
精彩评论