Skip to content Skip to sidebar Skip to footer

Flutter Sqlite Transaction Usage Error Warning Database Has Been Locked For

I am developing a mobile application that use sqlite and transaction. Below code is that getting order information from user using by using sqlite transaction saving model to multi

Solution 1:

SOLVED: be sure you don't use db instance inside the transaction as below

await db.query(tableName, where: "id =?", whereArgs: [order.id]);

instead of use as below

await txn.query(tableName, where: "id =?", whereArgs: [order.id]);

flutter does not warn you about any transaction usage error.

Post a Comment for "Flutter Sqlite Transaction Usage Error Warning Database Has Been Locked For"