new_x 1 Posted October 26, 2023 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; sqlite3.exe sample.db 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); begin SQLConnection1.Params.Add(‘Database=sample.db’); try // Establish the connection. SQLConnection1.Connected := true; executeButton.Enabled := true; outputMemo.Text := ‘Connection established!’; except on E: EDatabaseError do ShowMessage(‘Exception raised with message’ + E.Message); end; end; 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. Any idea, Best Regards, Share this post Link to post
mvanrijnen 123 Posted October 26, 2023 26 minutes ago, new_x said: I have been trying to build a DB program by using sqlite. I downloaded. ... Any idea, Best Regards, Probably some needed DLL which is not on your system (or incorrect version), can you see something in the windows event viewer (Windows -> Application logs) ? or try to run it from a seperate cmdline instance, maybe you then see some error message? or try to trace what files are tried to be loaded using procmon (from sysinternals). Share this post Link to post
Sherlock 663 Posted October 26, 2023 According to this https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Using_SQLite_with_FireDAC a download of SQLite DLLs is not necessary. You did provide a 64Bit DLL and your application failed. 32Bit without external DLL on the other hand ran smoothly. So....get rid of that new thing. Share this post Link to post
mvanrijnen 123 Posted October 26, 2023 1 hour ago, Sherlock said: According to this https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Using_SQLite_with_FireDAC a download of SQLite DLLs is not necessary. You did provide a 64Bit DLL and your application failed. 32Bit without external DLL on the other hand ran smoothly. So....get rid of that new thing. also for community edition? Share this post Link to post
Sherlock 663 Posted October 26, 2023 4 minutes ago, mvanrijnen said: also for community edition? According to the feature matrix found in here https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Community_Edition, yes. Share this post Link to post
mvanrijnen 123 Posted October 26, 2023 (edited) 8 minutes ago, Sherlock said: According to the feature matrix found in here https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Community_Edition, yes. ah, thats new for me 🙂 , in that case, dump the manual downloaded sqlite DLL 🙂 and just use FireDac Edited October 26, 2023 by mvanrijnen Share this post Link to post
weirdo12 19 Posted October 26, 2023 If you do want to use the latest version of SQLite, make sure to change the EngineLink property of your TFDPhysSQLiteDriverLink component to slDynamic and put the SQLite DLL in the same directory as the application exe. Share this post Link to post
new_x 1 Posted October 29, 2023 I used the FireDAC and everything seemed to be okay now. Thanks for your kind replies. By the way there was not any logged event in windows event viewer (Windows -> Application logs) Best Regards, Share this post Link to post
new_x 1 Posted November 1, 2023 Thank you for your replies. I decided to use FireDAC components and now there is no error. Best regards, 1 Share this post Link to post
TimLewis 0 Posted December 18, 2023 To connect SQL Server database, you can try SDAC. Share this post Link to post