Error Message "database table is locked"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error Message "database table is locked"

Manoj Sengottuvel
Hi Richard,

In our IOS app - we are getting the error "*database table is locked*"
while executing the table drop script (e.g. drop table tbl1;).

The same error we are getting for index drop also.

Pl let me know how to fix this issue.


Regards,
Manoj
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error Message "database table is locked"

Jens Alfke-2

> On Aug 8, 2017, at 9:38 PM, Manoj Sengottuvel <[hidden email]> wrote:
>
> In our IOS app - we are getting the error "*database table is locked*"
> while executing the table drop script (e.g. drop table tbl1;).

You may still have a compiled statement (sqlite3_stmt*) for a query that references this table. That will prevent the table from being deleted.
If you’ve got a reference to such a statement, free it first by calling sqlite3_finalize().
If you don’t, it may have been leaked, i.e. you may have created the statement but forgotten to finalize it.

—Jens
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Loading...