My sqlite3 database display this error:

```
Array (
  [0] => HY000
  [1] => 5
  [2] => "database is locked"
)

```

I have used php PDO for connect sqllite3 database.I have successfully read from database but cannot update/insert into database. It is always shows above error.

I have tried 777 rights to database and also test with it but got the same result.

I have solved above problem using `$db->beginTransaction();` and `$dbhandle->commit();`

Now problem is that I have used begintransaction before update query and commit after execute the query.Query return true every time but does not affect in database. any idea about it ?

**Note:** Query took long time to display error.