I found in that Firebird documentation, the correct way to use this command. The documentation talks about some precautions when using this command. From what I read in the documentation, it returns a compromised line if it uses the WITH LOCK
.
I read on some unofficial Firebird forums that the lines are automatically
"released" when performing a commit
or rollback
in the transaction. That is, it does not lock the tables, but rather the lines that were in the SQL
of WITH LOCK
executed.
Unfortunately I don’t have much experience in Firebird, so in a way, it’s very complicated to say all the impacts of using this command in your application. Maybe, as an outline solution and less impact on your system and database, use a flag
within the database (in a table of parameters, for example) would make the process more streamlined.
For example: if that column is like TRUE
, the system would return a message claiming that it is not ready for connection as it is going through an update process.
I hope I’ve helped.
I’m using Delphi 10.1 to write this system with Firebird.
– Edu Mendonça