views:

2225

answers:

3

Does the silverlight clr support access to a sql compact database placed in the silverlight application's isolated storage?

If so, any pointers to code samples.

I would like to cache information retrieved from the server in previous sessions.

+4  A: 

Even if it was stored in Isolated Storage, there is no Silverlight library to read in SQL Server Compact Edition. Perhaps in a future version. I have heard of a couple of open source projects that are trying to do this but there are not any that have releases yet. I tried to wrap the Google Gears DB in Beta 2 to no success.

Shawn Wildermuth
+2  A: 

There is no SQL client for silverlight. Also the user can delete your data from Isolated storage - right-click the running silverlight app and go to the "Application storage" tab. So just use it for user settings and for cached data that the app can work without, even if it is slower.

If you need to cache data locally, your best bet is to store it as XML in the isolated storage, reading and writing it using LINQ to XML.

If there's too much data for this, or the data is too complex to make this easy, then keep the data on your server and the silverlight client should then just access it over the net.

Anthony
A: 

Now is possible with siaqodb - silverlight client side database. You can store objects very easy and retrieve back using LINQ.

sqo