RegisterTables fails with EndOfStreamException

Dec 30, 2011 at 1:43 AM

When this happens, the RegisterDatabase<T>() method throws an EndOfStreamException. I cannot figure out how to get my database into a usable state as I do not have a ISterlineDatabaseInstance to Purge. Additional calls to RegisterDatabase<T> fail, and calls to _engine.SterlingDatabase.GetDatabase(string) fail as well.

Is there anything I can do to repair this database, short of finding the DB files in IsolatedStorage and deleting them?

Jan 6, 2012 at 4:06 PM

I was also having this issue during development, mostly due to lack of knowledge, changing tabledefintions, objects, crashes, and killing debug etc.  I found I was just creating a new DBName and then creating a new DB.  Eventually I just manually cleared the IsoStorage.

Some options I tried to think about doing was wrapping the RegisterDatabase in try/catch such that if it failed I then re-registered a new blank database with the same name and purged it, and then try again.  I'm definately going to need something to handle corruption and upgrades in the production world.

My DB is purely for caching so I can safely purge and re-load, its just a long refresh period for the users.

Did you come up with a resolution that works?

Jack

 

Mar 8, 2012 at 1:36 PM

I'm having the same issue jaddington. And since writing objects is not very fast with sterling I cannot save everything again...

I would like to know why da database become corrupt when it's not disposed. (when I stop debugger for example)