SQLite Forum

table locked when dropping a temp table
Login
Not positive on the reason for table locked, but have you made sure to finalize all the queries after running them?

An alternative, where you don't need to keep on renumbering the table would be to store floating-point numbers for order and to put a new item between two existing numbers just take the value that is the midpoint between them. You may still need to occasionally renumber if you start to get too many inserts in one place and start to use too many digits of precision