<span style='font-family:Verdana'><span style='font-size:12px'><span style="font-family: verdana;"><span style="font-size: 12px;">I wrote an application in Lazarus 0.9.30 with SQLite 3(I used only TSQLite3Dataset). Everything's fine 'till this morning. The application is written to run under WinCE arm devices.<br />
<br />
I wrote a method to archive the SQLite 3 database via TZipper. I reviewed the code logic dozen of times and it seems that there is no TSQLite3Dataset open. The code of my method is:</span></span><br />
<br />
procedure TfrmZiparBanco.spbtnZiparClick(Sender: TObject);<br />
var Zipper : TZipper;<br />
begin<br />
Zipper := TZipper.Create;<br />
Zipper.FileName := stxtZipFile.Caption;<br />
try<br />
Zipper.Entries.AddFileEntry(stxtArqEntra.Caption,ExtractFileName(stxtArqEntra.Caption));<br />
ShowMessageMobile(self,'before call');<br />
Zipper.ZipAllFiles;<br />
except<br />
On e: Exception do<br />
begin;<br />
ShowMessage('Error zipping file = ' + e.Message);<br />
Abort;<br />
end;<br />
end;<br />
end; // spbtnZiparClick <br />
<br />
I saw the "before call" message and after I receive:<br />
<br />
Error zipping file = Unable to open file "\Storage Card\esteio0805.db"<br />
<br />
The Zip file(the archive) was created, but with 0(zero) bytes in length.<br />
<br />
I made a single program that call the same method but didn't use the database(no declare, nor Open/Close). In this case the execution of the method was successfull and the zip file was created(I tried to open it with 7zip and it opens ok).<br />
<br />
It seems to me, that there are some components of the database(or TSQLite3Dataset) that remain opened even if I hit the Close method. As I already said above I review the logic dozen of times and it seems that there is no TSQLite3Dataset instances opened. It seems that there something locking the database file access.<br />
<br />
The error reported occurs in the windows mobile emulator and in a HP iPAQ too.<br />
<br />
Is it possible?<br />
<br />
Greetings from sao Paulo - Brasil<br />
<br />
Ricardo.'.<br />
<br />
</span></span>