Error connecting Delphi 10.2 + Zeos + Postgresql

Asked

Viewed 1,419 times

2

I’m trying to connect Zeos to a Postgresql database.

I already copied all the DLL’s to the application folder.

Zeos finds the DLL, but gives an incompatibility error:

Client-Library libpq.dll found but could not be Loaded. Check Compile-target and library Compatibility!

I already copied the DLL to windows and windows/system32 folder but I think the error is different.

My settings:

Windows 10 64bit - Postgresql 9 - Zeos 7.2.1 rc

EDITED

I downloaded the two versions of Postgresql (32bit and 64bit) and put the dll in two folders. When the application opens, the client has two connection options (32 or 64). I was able to connect on my pc using the 32bit, but when I tested on another pc (with the same settings), it did not work.

I already registered the DLL libpq.dll, even so, the error persists on the other machine (On my connected).

  • 1

    Tries to copy to Windows/SYSWOW64 because your Windows is 64 bits.

  • 1

    In addition to Copy, it is important to register the DLL regsvr32..., remembering to point the regsvr32 path to the proper system path, 32/64

  • From the searches I made, the error is due to the 32bit DLL and the 64bit OS or vice versa. I was able to solve it on my computer, but when I went to another computer, I made the same mistake... @Júniormoreira knows if Delphi makes this record?

  • In case the installation of Zeos must have done, then you must perform the registration: regsvr32 caminho\nome_dll

  • You mean to install the zeos on the client?

  • No, register the DLL that is missing.

  • did not work, even registering...

Show 2 more comments

1 answer

0


The solution is to include the folder where the DLL’s are in the Windows PATH.

My Computer > Properties > Advanced System Settings > Environment Variables

At this location, add the DLL directory in the PATH variable.

I tested on several computers and only a few did not work.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.