[Lazarus] TSQLite3Connection setting itself to active in the designer

Bernd prof7bit at googlemail.com
Sat Nov 26 19:17:52 CET 2011

I have made a strange observation: I have a form with a
TSQLite3Connection and all the other components needed to drive a
TDBGrid and everything is working fine. There is only one thing that
initially caused me problems until I found out what it was: When the
connection component is set to active at design time and I run my
application then sometimes when doing a commit it says "database
locked". The solution was to make sure it is set to active=False in
the designer and only activate it at runtime.

But now after making sure that everything is set to inactive I still
occasionally have the problem that suddenly I got my "database locked"
problems again during debugging and after looking into the connection
component something (not me) has set it to active again. I cannot
reproduce what exactly is causing this. I am absolutely sure I did not
change any of the TSQLQuery components or any other connected
component to active the last time it happened (today) The only thing I
can remember having done since yesterday (the last time I had to
deactivate it) was adjusting some positions and anchors on the form. I
tried to reproduce it but without success.

Its not really ultra dramatic, I can leave the DatabaseName property
empty (which is what I have done now) this will prevent it completely
from being activated at all. Strangely it does NOT help setting it to
a different copy of the sqlite file, for some reasons this will not
prevent the "database is locked" errors.


More information about the Lazarus mailing list