Postgresql woes lazarus / 16-Databases ---------------------------------------------------------------------- Trenatos · 2020-08-06 06:38 I've just installed Postgresql 12 on my Windows 10 dev machine, but I can't get my program to recognize the driver. When I place it in the same directory as the executable, I get Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Can not load PostgreSQL client library "libpq.dll" When I try to use the SQLDBLibraryLoader and specify the path I get the same message. I used Stack Builder to get the x64 driver. Anyone else run into this issue? ---------------------------------------------------------------------- marcov · 2020-08-06 07:18 So... do you generate a 64-bit EXE ? ---------------------------------------------------------------------- MarkMLl · 2020-08-06 09:36 Is libpq.dll on the system? Does the variant of PostgreSQL you installed include psql, and does it run? MarkMLl ---------------------------------------------------------------------- marcov · 2020-08-06 09:57 And note that the client (pqsql.dll) doesn't have to match the server in 32/64-bit bitness. But the dll must match the generated application 32/64-bit status. ---------------------------------------------------------------------- korba812 · 2020-08-06 10:32 Another note is that libpq.dll may depend on other libraries (in my case libcurl.dll, libeay32.dll, libiconv.dll, libintl.dll, libpq.dll, libxml2.dll, libxslt.dll ,ssleay32.dll, zlib1.dll) ---------------------------------------------------------------------- MarkMLl · 2020-08-06 13:07 And yet another note is that on at least some platforms, you might need to state explicitly where the dynamic libraries may be found. I mention that since even if it doesn't apply to current Windows, if we're talking about this problem we might as well be complete for the next time Google decides to turn up an unexpected reference :-) MarkMLl ---------------------------------------------------------------------- Trenatos · 2020-08-06 15:28 I'm generating a 64bit exe. I just made a new gui project, added a button and a TSQLDBLibraryLoader, set the connection type to Postgresql, and the buttons click handler sets enabled to true. When I start the program I immediately get an error "Invalid connection type:'PostgreSQL'" (Before the form is even visible) ---------------------------------------------------------------------- Trenatos · 2020-08-06 16:09 I DID get it working using ZeosDB, so that's good. But could not get it working with the Lazarus bundled functionality.