I have been trying to build a DB program by using sqlite. I downloaded
‘sqlite-dll-win64-x64-3430200.zip’ from sqlite home page, this is the current sqlite db implementation for windows 64 bit. This zip file just contains a dll and def file. I also downloaded the 32 bit tools file of the sqlite db (sqlite-tools-win32-x86-3430200.zip) . from this zip file I use “sqlite3.exe” (which is 32 bit I think). I copied the sqlite dll file into my Delphi app folder.
Then to create a db file, I used following command in command prompt;
then I found the following VCL code obtained from embarcaderro site;
In the design time the SQLConnection1’s driver property is set to ‘sqlite’
procedure TForm1.Button1Click(Sender: TObject);
// Establish the connection.
SQLConnection1.Connected := true;
executeButton.Enabled := true;
outputMemo.Text := ‘Connection established!’;
on E: EDatabaseError do
ShowMessage(‘Exception raised with message’ + E.Message);
If I compile the VCL app as 64 bit Windows Application, and run it and press the button1 then the code waits a little bit then the whole app closes. (Without giving any error message)
But if compile the Delphi application as Win32 application everything goes as expected without any error. Connection is established successfully.