In my application, I’ve two threads running. One will be querying the server and updates the database. Other thread will get the data and update the UI.
The issue is that when both read and write are calling database simultaneously one is failing.
the error is as follows:
Error while creating SELECT c.id, c.address, c.type, e.id, e.name, e.logo, e.system, c.city FROM cashpoints c, entities e WHERE e.id = c.entity AND c.id = ?; => ‘database is locked’
In my application, I’ve two threads running. One will be querying the server and
Share
As mentioned in the comments by @meccan, the solution is to use FMDB or better go with core data.