Giter Club home page Giter Club logo

Comments (6)

Kornelis avatar Kornelis commented on September 13, 2024

For me it worked using:

tran.ExecuteAsync("UPDATE Settlement SET Completed = 1 WHERE DamagedObjectId = ?", settlement.DamagedObjectId);

from sqlite-net.

mattlunn avatar mattlunn commented on September 13, 2024

I also get this issue on Metro using sqlite3.dll (3.7.13)

from sqlite-net.

timheuer avatar timheuer commented on September 13, 2024

For those hitting this can you try one of the options below and see if it helps?

Adding this code right after opening the database produces the expected
result:

verifySQLResult(SQLite3.Execute(_db, "PRAGMA temp_store = memory;", 0, 0, 0));

Alternatively, the following code could be used (also right after opening the
database):

var TempPath = Windows.Storage.ApplicationData.Current.TemporaryFolder.Path;
verifySQLResult(SQLite3.Execute(_db, string.Format(
"PRAGMA temp_store_directory = '{0}';", TempPath), 0, 0, 0));

from sqlite-net.

Kornelis avatar Kornelis commented on September 13, 2024

As already said, try using executeAsync() instead of execute().

Tim Heuer [email protected] schrieb:

For those hitting this can you try one of the options below and see if it helps?

Adding this code right after opening the database produces the expected
result:

verifySQLResult(SQLite3.Execute(_db, "PRAGMA temp_store = memory;", 0, 0, 0));

Alternatively, the following code could be used (also right after opening the
database):

var TempPath = Windows.Storage.ApplicationData.Current.TemporaryFolder.Path;
verifySQLResult(SQLite3.Execute(_db, string.Format(
"PRAGMA temp_store_directory = '{0}';", TempPath), 0, 0, 0));


Reply to this email directly or view it on GitHubhttps://github.com//issues/78#issuecomment-7985751.

from sqlite-net.

timheuer avatar timheuer commented on September 13, 2024

Kornelis - I'm just trying to determine/help with perhaps a more fundamental issue with WinRT app usage and SQLite (and specifically those using this lib as well). If the temp_store works it will help continue to isolate (and perhaps change something we need in SQLite to expose an export for this option)

from sqlite-net.

damirarh avatar damirarh commented on September 13, 2024

Tim, you are right. If I add either

Execute("PRAGMA temp_store = memory;");

or

var TempPath = Windows.Storage.ApplicationData.Current.TemporaryFolder.Path; 
Execute(String.Format("PRAGMA temp_store_directory = '{0}';", TempPath));

to the SQLiteConnection constructor right after the call to SQLite3.Open I get the expected behavior - the issue doesn't occur any more.

Kornelis, while your workaround avoids this issue, it's generally not a good idea to call SQLiteAsyncConnection methods inside RunInTransactionAsync. As I described in issue #73 this can result in a deadlock when the call ends up running in a different thread. It happened to me in application code. That's way I marked SQLiteAsyncConnection.RunInTransactionAsync(Action<SQLiteAsyncConnection>) as obsolete and added the override accepting Action<SQLiteConnection> instead.

from sqlite-net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.