peterhuene / sqlite-net-wp8

A C++/CX wrapper for SQLite functions that sqlite-net depends on. Can be used as an alternative to csharp-sqlite on Windows Phone 8. This library is released under the MIT license.
MIT License
74 stars 65 forks source link

UpdateAll Exception #38

Open Grunt101 opened 10 years ago

Grunt101 commented 10 years ago

Hi,

I recently updated the solution to the latest version of Sqlite-Net-WP8, but now I see that whenever I try to call UpdateAll, I get the following exception :

{SQLite.SQLiteException: SQL logic error or missing database at SQLite.SQLiteConnection.Update(Object obj, Type objType) at SQLite.SQLiteConnection.Update(Object obj) at SQLite.SQLiteConnection.<>cDisplayClass17.b16() at SQLite.SQLiteConnection.RunInTransaction(Action action) at SQLite.SQLiteConnection.UpdateAll(IEnumerable objects)

This used to work in the previous version I had, so not sure what is different?

Thanks

gregdickie commented 10 years ago

Hi Grunt101,

I'm having the same problem now in my code after updating. Were you ever able to figure out what the problem was?

Thanks

Grunt101 commented 10 years ago

Hey Greg,

Yip, I did eventually find the fix. It has to do with setting the temp directory for SQLIite to use. Try executing this query before you do any DB interactions.

sqLiteConnection.Execute("PRAGMA temp_store_directory = '" + DATABASE_LOCATION + "'");

It should then fix the issue above.

Hope it helps you out

Cheers

gregdickie commented 10 years ago

Thanks Grunt101, I’ll give that a try.

Greg

From: Grunt101 [mailto:notifications@github.com] Sent: Friday, September 26, 2014 12:09 PM To: peterhuene/sqlite-net-wp8 Cc: Greg Dickie Subject: Re: [sqlite-net-wp8] UpdateAll Exception (#38)

Hey Greg,

Yip, I did eventually find the fix. It has to do with setting the temp directory for SQLIite to use. Try executing this query before you do any DB interactions.

sqLiteConnection.Execute("PRAGMA temp_store_directory = '" + DATABASE_LOCATION + "'");

It should then fix the issue above.

Hope it helps you out

Cheers

— Reply to this email directly or view it on GitHubhttps://github.com/peterhuene/sqlite-net-wp8/issues/38#issuecomment-56998979.