Book Image

Windows Phone 7.5 Data Cookbook

By : Ramesh Thalli
Book Image

Windows Phone 7.5 Data Cookbook

By: Ramesh Thalli

Overview of this book

Windows Phone 7.5 Mango contains support for apps written in Silverlight or XNA. These apps can store data on the device, and also load and manipulate data from "the cloud" and other web services.This Windows Phone 7.5 Data Cookbook has a range of recipes to help you apply data handling concepts. You will be able to apply the knowledge gained from these recipes to build your own apps effectively. This Windows Phone 7.5 Data Cookbook starts with data binding concepts at the UI layer and then shows different ways of saving data locally and externally in databases. The book ends with a look at the popular MVVM software design pattern. The recipes contained in this book will make you an expert in the areas of data access and storage.
Table of Contents (15 chapters)
Windows Phone 7.5 Data Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

SQLite Client as an embedded database


In this recipe, we will explore how to use the SQLite Client CodePlex—an open source database API (application programming interface)—to open, save, delete, update, and close the SQLite file.

Getting ready

Download SQLite Client from the following address: http://sqlitewindowsphone.codeplex.com/releases. At the time of writing this book, the latest stable version was Rel 2. Ver 0.6.1. Download the zipped file and unzip it to a local folder.

How to do it...

In this recipe, we will explore the test sample that comes with the SQLite Client SDK download. This sample demonstrates pretty much all the different features of SQLite embedded database.

  1. Open the Community.CsharpSqlite.WP solution.

  2. Press F5 to see the results as shown in the following screenshot. The main page has different buttons to showcase SQLite's capabilities. This test application can be used to open and close the database. Once the database is open, we can create as well as drop the table using...