Problem Re-Loading Database *Solved*

Feb 26, 2011 at 5:50 PM

Hi All,

I'm having a problem re-loading my data from the database once I have re-started my application. I can save my classes and view that the number of saved objects via _dbManager._databaseInstance.Query<MyClass, Guid>().Count(). But when I close and re-open my application, the number of stored objects resets to zero!

In Application_Launching() I am calling:

_engine = new SterlingEngine();
_engine.Activate();
_databaseInstance = _engine.SterlingDatabase.RegisterDatabase<MyDatabase>();

Also the Isolated Storage Explorer tool is showing the correct number of files for the table I am working with.

Any ideas what I am doing wrong?

Cheers,

Donster

Coordinator
Feb 26, 2011 at 6:41 PM

Are you activating on launching and activated? And flushing/disposing on deactivated and exiting? Can you reload after saves before you restart the application? It sounds more like a case of the keys not flushing after you are done. Is this for the phone or the desktop?

Feb 28, 2011 at 7:24 PM

Hi Jeremy,

I'm using it for a windows phone 7 app. Thank you, I wasn't flushing/disposing on exiting, hence my problem.

Cheers for your help!

Donster