Recent

Author Topic: Old issue with slite3.dll  (Read 1577 times)

Tiago

  • Newbie
  • Posts: 4
Old issue with slite3.dll
« on: May 27, 2020, 01:44:21 am »
Hi
I read some topics in this forum about the"Can not load SQLite client library "sqlite3.dll". Check your installation" in this forum.
I tried all the tricks but I'm still facing this problem.

I tried 32 bits and 64 bits dll
Tried to put in the PATH
Tried to put in the lazarus.exe directory
Tried to put in the folder of my application
Tried to use the tips in this thread https://forum.lazarus.freepascal.org/index.php?topic=47226.0

I have this problem in the Design time and run time. Until now I couldn't connected in my sqlite dabase using Lazarus.

My dabase is ok because I can connect using the sql tool and DBEaver

If you wish I can share my project, it's very simple, just have SQLite3Connection and SQLTransaction... I didn't go further because I'm stuck in this moment

Do you have another tip to try?

Tks in advance

Nomos

  • New Member
  • *
  • Posts: 11
Re: Old issue with slite3.dll
« Reply #1 on: May 27, 2020, 02:44:30 am »
Mhh, strange phenomena.

Can you start sqlite via PowerShell or CMD by typing "sqlite3" (without hyphens)?

Regards

Tiago

  • Newbie
  • Posts: 4
Re: Old issue with slite3.dll
« Reply #2 on: May 27, 2020, 03:38:01 am »
Yes, I can

Actually I can create my databases using CLI without problem, and after this I can connect using DBEaver

I was using Lazarus 2.0.6 but now I updated to 2.0.8 (in fact I uninstall and install the new one)

But I still have the same problem

:-(

jt74

  • Newbie
  • Posts: 1
Re: Old issue with slite3.dll
« Reply #3 on: May 27, 2020, 05:58:02 am »
Tiago,
I'm assuming your sql3connection.DatabaseName has the path to your database file and put the sqlite.dll in the same directory as your application.
Hope that helps.

nouzi

  • Sr. Member
  • ****
  • Posts: 296
Re: Old issue with slite3.dll
« Reply #4 on: May 27, 2020, 10:22:53 am »
Share your code source .
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

Tiago

  • Newbie
  • Posts: 4
Re: Old issue with slite3.dll
« Reply #5 on: May 27, 2020, 12:27:11 pm »
Hi, tks for your fast reply

Here is the "project".  As I told you it's in the beginning

https://1drv.ms/u/s!An3AUied17837NcZu0NvycsLs7J2fw?e=uye5n9

Tks in advance

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Old issue with slite3.dll
« Reply #6 on: May 27, 2020, 12:38:56 pm »
Your exes are 32-bit and your dll is 64-bit.
Note that Lazarus might need the DLL also (to e.g. get a list of tables).

You also don't say when you get the error, in the IDE while editing or opening projects, or when running the app.

So, you need:
- a dll in the same bittiness as lazarus in the lazarus dir. For use by lazarus while doing designtime editing
- a dll in the same bittiness as the application in the application dir, that the application can use while running.

I can imagine this leads to confusing situations when lazarus is 32-bit and the app is 64-bit. I don't have much experience with that situation though.


Tiago

  • Newbie
  • Posts: 4
Re: Old issue with slite3.dll
« Reply #7 on: May 27, 2020, 01:13:37 pm »
Hi, tks for your reply

I was testing and forgot the wrong dll but I tried with both (32 and 64 bits dll)

The error occurs in design time when I choose "connect" or "active"

I tried to leave connect false in design time and then try connect in runtime, but I get the same error

Tks in advance

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Old issue with slite3.dll
« Reply #8 on: May 27, 2020, 01:22:42 pm »
Hi, tks for your reply

I was testing and forgot the wrong dll but I tried with both (32 and 64 bits dll)

As said, find out what type (32/64) EXE you generate, and what type your lazarus is, and  then put the DLLs to match as I described.

Quote
The error occurs in design time when I choose "connect" or "active"

That would be the IDE.

Quote
I tried to leave connect false in design time and then try connect in runtime, but I get the same error

Tks in advance

But that would be the EXE. So that are already two different situations.

 

TinyPortal © 2005-2018