Hi Ralf, Sorry, looks like it's my problem, I didn't read the doc about sqlite3_shutdown, just copied the example code and turn it into a reusable function, so I should move the call to sqlite3_shutdown at the very end of my app :)\ Thanks for your help! On Tue, Jan 4, 2011 at 7:01 PM, Delphi Inspiration <delphi@xxxxxxxx> wrote: > On 04.01.2011 10:49, Edwin Yip wrote: > > > Attached an example that reproduces this problem. > > Your attachment contains a single unit file only. By itself, this does > not compile as its corresponding form and project files are missing. > > I converted your code snippets from Unit1.pas into a console application > and was thus able to reproduce your problem. > > > I hope you can fix it in a quick manner :) > > The fix is described in the header comment of the attached > SQLite_HotBackup_Problem_Fix.dpr file. I have also corrected the code - > the project now compiles and runs without errors. > > Please note that you did not mention the real cause of your problem > (SQLite functions called after sqlite3_shutdown) in your initial problem > description. Because users are sometimes unaware of the big differences > which can result from small code changes, I always insist on fully > compilable projects. They are the only reliable way for me to reproduce > user's problems exactly as experienced. > > Ralf > -- Best Regards, Edwin Yip Mind Mapping is as Effortless as Typing http://www.InnovationGear.com