O'Reilly logo

Microsoft® Mobile Development Handbook by Peter Foot, Daniel Moth, Andy Wigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Persisting Data Without a Database

SQL Server CE is a good choice for storing and organizing your data, but it is not the only choice. There are two lighter-weight alternatives you can use:

  • You can create your own DataSet and use its built-in capability to persist itself as an XML file.

  • You can use a custom object and use XML serialization to save its state to a file.

Persisting to a file is often used for simple data records such as the settings for an application.

Serializing DataSet Objects

You can add a DataSet to your project and use the Data Designer to design tables in it, or you can create a DataSet programmatically. Then you store your data in it in the same way you do using a DataSet that you created by dragging tables from a SQL Server CE ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required