SQLite + Lazarus lazarus / 16-Databases ---------------------------------------------------------------------- talesrj · 2015-04-28 05:26 Hi guys, I have the same problem, using Lazarus at Windows 7 x64. I tried all the places for sqlite3.dll (same dir than project, windows, system32, etc), but without sucess. Everytime that I tried to run a SQLite, this error appears: Project projeto raised exception class 'EInOutError' with message: Can not load SQLIT client library "sqlite3.dll". Check you installation. At address 63B1AF Does anybody can help me? Thanks! ---------------------------------------------------------------------- exdatis · 2015-04-28 05:37 Set environment variable(system, advanced settings, environment var, path). p.s. http://forum.lazarus.freepascal.org/index.php/topic,26148.msg1610 10.html#msg161010 ---------------------------------------------------------------------- avra · 2015-04-28 07:05 Quote from: talesrj on April 28, 2015, 07:26:33 amI tried all the places for sqlite3.dll (same dir than project, windows, system32, etc), but without sucess.Have you tried to put "sqlite3.dll" to "Lazarus.exe" dir? ---------------------------------------------------------------------- marcov · 2015-04-28 13:15 Yup, sqlite3.dll must be either in a system wide directory or in both the application and ide directories ---------------------------------------------------------------------- talesrj · 2015-04-28 16:36 Hi, I made three copies of the sqlite3.dll (windows dir, lazarus folder and project folder) and also I set the lazarus path in the system path, but neither of these actions was successful. Any idea? Thanks! ---------------------------------------------------------------------- rvk · 2015-04-28 18:14 Quote from: talesrj on April 28, 2015, 07:26:33 amI have the same problem, using Lazarus at Windows 7 x64. I tried all the places for sqlite3.dll (same dir than project, windows, system32, etc), but without sucess. Putting sqlite3.dll in the Lazarus-directory and your project directory (where the .exe is) should be sufficient. But you said: system32. You should know that system32 on a 64-bit system is C:\Windows\SysWOW64 and not C:\Windows\system32. So 32bit dll's go in C:\Windows\SysWOW64 and 64bit dll's go in C:\Windows\system32. (logic, huh ) But as said, you don't need the sqlite3.dll in either of those directories. What you didn't clarify is you target bitness. Are you compiling to a 32bit program or a 64bit program? If you're compiling to a 64bit program you would also need the 64bit sqlite3.dll (and not the 32bit sqlite3.dll). ---------------------------------------------------------------------- fpcoder · 2015-04-28 18:31 I add my sqlite directory to the system path like this: From Explorer, right-click "Computer" Click "Properties" Click "Advanced System Settings" Click "Environment Variables" Under "System Variables", select "Path" and then click the "Edit" button below. Now, first in the line add: c:\whatever\sqlite; Dont forget the SEMICOLON at the end. And probably you should delete the DLL's you have added to other directories. ---------------------------------------------------------------------- rvk · 2015-04-28 18:40 Quote from: kapibara on April 28, 2015, 08:31:54 pmSQLite also needs the matching Microsoft Visual C++ Runtime Library to work. I dont remember which one it is though. Are you sure??? You are talking about "System.Data.SQLite". That's not SQLite itself. System.Data.SQLite is an ADO.NET provider for SQLite. For SQLite itself refer to: http://www.sqlite.org/ QuoteSQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.and QuoteSelf-contained: no external dependencies So for SQLite itself there is definitely no  Microsoft Visual C++ Runtime Library needed. ---------------------------------------------------------------------- fpcoder · 2015-04-28 18:55 @RVK Sounds reasonable! I just remember having to install that C++ runtime lib everytime I set up a new machine with Lazarus and DB. But it might be that it is Postgres that needs it, and not SQLite. ---------------------------------------------------------------------- Leledumbo · 2015-04-29 05:44 Quote from: talesrj on April 28, 2015, 06:36:02 pmHi, I made three copies of the sqlite3.dll (windows dir, lazarus folder and project folder) and also I set the lazarus path in the system path, but neither of these actions was successful. Any idea? Thanks! check the bitness between lazarus and the dll, they cannot be mixed.