Initial Look: Storing SQL Compact Data on a Windows Phone 7 Series
Posted
by Nikita Polyakov
on Geeks with Blogs
See other posts from Geeks with Blogs
or by Nikita Polyakov
Published on Wed, 17 Mar 2010 21:11:36 GMT
Indexed on
2010/03/17
22:31 UTC
Read the original article
Hit count: 552
Ok, the title is misleading – I’ll admit it, but there is a way to store your data in Windows Phone 7 Series.
Windows Phone 7 Silverlight solutions have what is called Isolated Storage. [XNA has content storage as well]
At this time there is no port of SQL Compact engine for Silverlight Isolated Storage. There is no wind of such intention.
[That was a question way before WP7 was even rumored to have Silverlight.]
There a few options:
1. Microsoft recommends you “simply” use client-server or cloud approach here. But this is not an option for Offline.
2. Use the new Offline/CacheMode with Sync Framework as shown in the Building Offline Web Apps Using Microsoft Sync Framework MIX10 presentation see 19:10 for Silverlight portion [go to 22:10 mark to see the app].
3. Use XlmSerializer to dumb your objects to a XML file into the Isolated Storage. Good for small data.
4. Experiment with C#SQLite for Silverlight that has been shown to work in WP7 emulator, read more.
5. Roll your own file format and read/write from it. Think good ol’ CSV. Good for when you want 1million row table ;)
Is Microsoft aware of this possible limitation? Yes.
What are they doing about it? I don’t know. See #1 and #2 above as the official guidance for now.
What should you do about it? Don’t be too quick to dismiss WP7 because you think you’ll “need” SQL Compact.
As lot of us will be playing with these possible solutions, I will be sure to update you on further discoveries.
Remember that the tools [even the emulator] released at MIX are CTP grade and might not have all the features.
Stay up to date: Watch the @wp7dev account if you are on Twitter. And watch the Windows Phone Dev Website and Blog.
More information and detail is sure to come about WP7 Dev, as Windows Phone is planned to launch “Holidays” 2010.
[For example Office will be discussed in June from the latest news, June is TechEd 2010 timeframe btw]
© Geeks with Blogs or respective owner