The timer event is executed by the VCL message pump which will not run until the SQL command has been processed.What appeared to happen was that the timer was enabled and then the sql ran OK. But only after the sql had completely finished did the timer get to fire its OnTimer event for the very first time. It was as if DISQLite3Database1.Execute had prevented any other events being picked up, so the timer didn't fire until the sql had finished.
I see two options:a) Break your lengthy SQL statement is several blocks (e.g. if you insert a long list of data rows). Update your progress indicator in between these blocks.
b) Move all SQLite database handling into an own thread. This requires communication mechanism between your main thread and the DB thread (Locks, PostMessage, etc.) and usually adds quite some complexity.
Regards, Tobias _______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa