On 8 May 2016, at 3:14am, just_rookie <925345468 at qq.com> wrote:

> But when I ran the program in Linux, I got an error message from 
> sqlite3_exec() that ?database is locked?.

You have not set a timeout, so SQLite is quitting as soon as it is told that 
another thread/process has the database locked.  Set a timeout by executing

PRAGMA busy_timeout = 5000

immediately after opening your connection to the database.

Simon.

Reply via email to