You are not logged in.
Pages: 1
Hi,
I'am scratching my head with this.
ESqlDBPostgres {Message:"TSqlDBPostgresLib.TryLoadLibray failed - searched in C:\\Users\\flydev\\Documents\\Embarcadero\\Studio\\Projets\\SagasEnv\\RemoteBlock2\\bin2\\libpq.dll, libpq.dll",Statement:null}
I installed Postgres 14, copied the libs (crypto, iconv, libintl, libssl, zlib and libpq.dll) in the same directory of the executable, I tried to add as well this dir on env PATH, but nothing.
Is there something special to do ?
---
Edit: Just added `C:\Program Files\PostgreSQL\14\bin` to the env PATH and it's working..
Last edited by flydev (2022-08-25 12:58:47)
Offline
Are you using 32-bit? Postgres14 comes only with a 64-bit client
Offline
@daniel thanks, indeed the executable is compiled in 64bit. I double checked with a PE tool after compilation.
I must add FYI, that I tried to load the lib with this simple call
var Handle := LoadLibrary('libpq.dll');
if Handle <> 0 then
WriteLn('OK')
else
WriteLn('BAD');
and it return 'BAD'
with the env PATH modified, it return 'OK'.
I also read the whole following thread found on Lazarus forum: https://forum.lazarus.freepascal.org/in … 4cpaer7mh3
I will come back for sure to this issue as the solution to modify the ENV path like in my first message is only viable for my local dev environment.
Last edited by flydev (2022-08-25 17:18:50)
Offline
For mROMot1 there is global variable SynDBPostgresLibrary in unit SynDBPostgres - set it to libpq.dll location (for example SynDBPostgres := 'D:/PostgreClient/10/x64/bin/libpq.dll') and all should woks without playing with PATH.
BTW PostgreSQL on Windows works extremely bad - it designed for Linux
Last edited by mpv (2022-08-25 18:55:13)
Offline
I used Microsoft Sysinternals Procmon.exe to find what files my project is looking for and what files are missing, that helped me to find all dll files required by PostgreSQL (7 dlls AFAIR)
Offline
I didn't think about that at all. Thanks you ! Will share the result / solution
BTW PostgreSQL on Windows works extremely bad - it designed for Linux
Thanks for insight, indeed, I am migrating the infrastructure on Unix server as Windows Server only bring me problems, especially with database servers.
Last edited by flydev (2022-09-01 08:33:46)
Offline
Pages: 1