Home > Back-end >  D10, to delete the SQLite database table suggests "the database table is locked" problem
D10, to delete the SQLite database table suggests "the database table is locked" problem

Time:11-06

In Delphi10, use SQLite database, in a Form to Create a Temporary Table tmpA (" Create Temporary Table tmpA (... ) "), in the same Form to delete the Table (" Drop Table tmpA "), the prompt "database Table is locked.", has confirmed that use tmpA Table all the connections are closed, always can't find the reason,
God, please help me to find the reason, how to solve, thank you!

CodePudding user response:

Sqlite is based on the database file, lock table need application maintains, unlock,

CodePudding user response:

Just don't know why the lock, to create a temporary table - data - data query - delete table, increase or decrease is such operation, no other operation involving the table,

CodePudding user response:

What a great god help solve, thank!

CodePudding user response:

Temporary table should not removed manually, closed program automatically deleted

CodePudding user response:

Run a program, there may be multiple perform related functions, each time to generate temporary tables according to different requirements, so every time you try to delete the temporary table,

CodePudding user response:

Now the solution is: delete temporary table before, first perform FDConnection. Close, but the current should be open the table one by one to even open,