SUMMARY
This chapter covered a large territory; enough for a book in its own right. You learned how to store and retrieve data in a number of ways including text files and database tables. You looked at the Microsoft SQL Compact 3.5 SP2 database technology in detail. This content is normally not covered in embedded operating systems books but left to the mobile devices books, to which you can refer for more detail. This content is important though for embedded devices because they are about data capture and manipulation and include the use of efficient and robust data storage and queries.
A further topic that could have been covered is the data synchronization between the SQL Compact database and a remote SQL server. This would cover topics such as merge replication, RDA, and the new Microsoft Sync Framework. They would take a few more chapters on their own, though, so you can go to MSDN and the mobile devices books for those topics. Although Merge Replication is simple to code, it can be difficult to configure for an embedded device. Also, note that Microsoft SQL Server Compact 4 is not available for Windows Embedded Compact 7 — at least not initially.
You can implement a form of merge replication with the existing code in this chapter. Just use the Remote SQL read and writes code to send and receive data to and from the SQL server. The result of a select (read) query from the server is written to the Compact database. An update query (write) to the SQL server will take changed ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access