Database file locked

the program I am working on receives data from a web service, adds data to the database, deletes and updates. But sometimes, when I launch my application, all the actions are successful, but sometimes, when I want to add, delete or update data, I get this error.

The server failed to process the request. ---> Database file locked database locked

I can’t understand that the same program works fine at some time, but at some point the program itself gives this message.

+5
source share
3 answers

SqlLite does not allow two threads to use the database at the same time.

- lock .

+5

SysInternals. Process Monitor (procmon). , , , "" DB.

Sqlite DB, ​​ (INSERT/UPDATE/DELETE) . , . Mutex , .

BTW, sqlite . , , , .

+4

Are you using a file database like Access?

The database file is always locked (in almost the entire database system), try stopping the database service to unlock the file.

+3
source

All Articles