import sqlite3
table_name = 'table_name' conn = sqlite3.connect(location)# This line is not reached, so database is locked. pass:
因此,如果我们运行上面的代码并发生异常,数据库就会被锁定。
我使用sqlite,因为application.It的数据库一切正常工作,但是当我要从数据库中删除一个表时,它会使用[]抛出这个错误:java.sql.SQLException: [SQLITE_LOCKED] A table in the database is locked (database table is locked)
我使用的是no-auto-commit-mode,所以在删除表之前,我已经拥有了committed.Why,这种情况正在发生吗?一个可能的解决方案是