SOLVED Problems with SQLite3.dll lazarus / 16-Databases ---------------------------------------------------------------------- eshjim · 2016-06-05 19:54 I am new to Lazarus and this forum, and I do appreciate that this topic has been covered elsewhere but unfortunately the answers I have seen are a little too technical for me (environment variables, etc.), having been accustomed to Delphi in the past and being able to use "straight out of the box" without having to worry about loading DLL's for basic programming. I have 32-bit Lazarus running on Windows 7 64-bit.  To become accustomed to SQLite, I decided to follow the Wiki SQL sample programs.  The DBConnection component connects successfully to the database and the project compiles, but on running, I get the infamous "Can not load SQLite client library "sqlite3.dll"."  I unzipped the 32-bit dll to the main Lazarus folder as well as the folder in which the project resides (no exe yet).  The SQLite3laz 0.4 package is also installed. I would really appreciate any help for a Lazarus newbie. ---------------------------------------------------------------------- ezlage · 2016-06-05 20:54 Extract the sqlite3.dll to your Project Folder, and use Component.LibraryLocation:=".\sqlite3.dll". ---------------------------------------------------------------------- ezlage · 2016-06-05 20:59 Sorry, my suggestion works with ZeosDBO. With components on SQLDB tab, use the component SQLDBLibraryLoader. ---------------------------------------------------------------------- eshjim · 2016-06-05 21:59 Quote from: ezlage on June 05, 2016, 10:59:01 pmSorry, my suggestion works with ZeosDBO. With components on SQLDB tab, use the component SQLDBLibraryLoader. Thanks for that.  I added an SQLDBLibraryLoader component, enabled it and made its ConnectionType SQLite3, LibraryName SQLite3.dll.  Again, the project compiles but I now get an EDatabaseError - SQLDBLibraryLoader1: This operation is not allowed while the database is loaded. I then tried setting the above properties at run time in the Form Create procedure.  That then reverts to the original SQLite3.dll cannot load message. ---------------------------------------------------------------------- fpcoder · 2016-06-05 22:51 I use SQLdb and if you put the sqlite dll in its own directory and add that directory to the system path you should be able to start all your compiled sqlite projects without having a sqlite dll in them. Not sure about the EDatabaseError, but try deactivating the sqlite connection at design time, in Lazarus, and activate it by code at runtime. ---------------------------------------------------------------------- ezlage · 2016-06-05 23:34 Quote from: kapibara on June 06, 2016, 12:51:29 amNot sure about the EDatabaseError, but try deactivating the sqlite connection at design time, in Lazarus, and activate it by code at runtime. I believe that work well this way. This EDatabaseError says that the connection is active (or trying to be). ---------------------------------------------------------------------- eshjim · 2016-06-06 22:05 Quote from: kapibara on June 06, 2016, 12:51:29 amI use SQLdb and if you put the sqlite dll in its own directory and add that directory to the system path you should be able to start all your compiled sqlite projects without having a sqlite dll in them. Not sure about the EDatabaseError, but try deactivating the sqlite connection at design time, in Lazarus, and activate it by code at runtime. Thanks for that.  Amending the system path did the trick.