Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock table when drop table #103

Open
leichenlei opened this issue Aug 22, 2018 · 0 comments
Open

Lock table when drop table #103

leichenlei opened this issue Aug 22, 2018 · 0 comments

Comments

@leichenlei
Copy link

CODE:

public static void dropTable(Connection conn, String tableName) throws SQLException { try (Statement statement = conn.createStatement()) { statement.execute("DROP TABLE " + tableName); } }

EXCEPTION:
org.sqlite.SQLiteException: [SQLITE_LOCKED] A table in the database is locked (database table is locked) at org.sqlite.core.DB.newSQLException(DB.java:909) at org.sqlite.core.DB.newSQLException(DB.java:921) at org.sqlite.core.DB.execute(DB.java:822) at org.sqlite.core.CoreStatement.exec(CoreStatement.java:75) at org.sqlite.jdbc3.JDBC3Statement.execute(JDBC3Statement.java:61)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant