Loading Keys

Aug 15, 2011 at 9:33 PM

I'm having a problem querying keys after I close and re-open my WP7 app.

The first time I run my app (in the emulator) I download some data from a webservice and save it to a database (including a flush). 

When I query the keys I get a result back.

If I close the app and run it a second time in the emulator the same query returns nothing.

I'm guessing I need to do something to load the keys out of the database that has been serialised to the iso store.

Any ideas?

 

Cheers

Steve

Coordinator
Aug 15, 2011 at 9:38 PM

Are you setting up an isolated storage driver? Otherwise it will default to in-memory. Should be:

.RegisterDatabase<MyDatabase>(new IsolatedStorageDriver());

Jeremy

Aug 15, 2011 at 9:49 PM

Thanks - that did the trick.

I didn't see the IsolatedStorageDriver mentioned in any of the docs I read:

http://www.sterlingdatabase.com/sterling-user-guide/3-the-sterling-engine

http://www.wintellect.com/CS/blogs/jlikness/archive/2010/12/28/using-sterling-in-windows-phone-7-applications.aspx

Is there a better or updated doc I should read?

Cheers

Steve

Coordinator
Aug 15, 2011 at 9:58 PM

The quickstart has it:

http://www.sterlingdatabase.com/sterling-user-guide/getting-started

On the download page for the 1.5 version, it links directly to the features discussion:

http://sterling.codeplex.com/discussions/253312 

I've also updated the documentation to refer to the unit tests which should help out.

I know the main documentation needs to be udpated, will work on that when I can!

Jeremy

Aug 15, 2011 at 10:00 PM

Thanks for the update. I really appreciate the fast response. 

Cheers

Steve