Cannot find a usable libpq.dll
I've done the following things:
- installed PostgreSQL on my Windows 7 machine
- restarted my machine
- downloaded the latest version of HeidiSQL (9.2.0.4947)
- copied the libpq.dll from C:\Program Files\PostgreSQL\9.4\lib\ to C:\Program Files\HeidiSQL\
- launched HeidiSQL from C:\Program Files\HeidiSQL\
Yet I'm still getting the following error message:
Cannot find a usable libpq.dll. Please launch heidisql.exe from the directory where you have installed it.
How do I get HeidiSQL to connect to a PostgreSQL database on a network server without getting this error?
You should not be required to copy some other .dll file to HeidiSQL's folder.
After that, I launched HeidiSQL and got the following window. It still says that PostgreSQL is experimental (see attachment 1). And I still get the same error as shown in attachment 2.
How do I install HeidiSQL so that I can connect to PostgreSQL?
Well, I just tried the "HeidiSQL_9.3.0.5049_Setup", same issue. However, if I put "heidisql32.r5049.exe" in the folder and run it, it works, but but the 64 bit version. The 32 version crashes on exit though.
date/time : 2016-02-09, 08:09:50, 887ms
computer name : DEVELOPER-VS
user name : Caleb-VS
operating system : Windows 10 x64 build 10586
system language : English
system up time : 6 days
program up time : 8 seconds
processors : 8x Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz
physical memory : 5486/16296 MB (free/total)
free disk space : (C:) 96.10 GB
display mode : 1536x864, 32 bit
process id : $2e08
allocated memory : 43.66 MB
largest free block : 1.12 GB
executable : heidisql32.r5049.exe
exec. date/time : 2016-02-09 08:05
version : 9.3.0.5049
compiled with : Delphi XE5
madExcept version : 4.0.12
callstack crc : $56492c7f, $c70d16f6, $c70d16f6
exception number : 1
exception class : EAccessViolation
exception message : Access violation at address 56492C7F in module 'libpq.dll'. Write of address 001A0010.
main thread ($3f28):
56492c7f libpq.dll
564920ca libpq.dll PQfinish
0083cb06 heidisql32.r5049.exe dbconnection 1960 +47 TPgConnection.SetActive
0094a844 heidisql32.r5049.exe Main 2051 +52 TMainForm.ConnectionsNotify
0040c978 heidisql32.r5049.exe System 196 +0 DynArraySetLength
008616a2 heidisql32.r5049.exe dbconnection 38 +0 {System.Generics.Collections}TList<dbconnection.TDBConnection>.Notify
00862317 heidisql32.r5049.exe dbconnection 728 +0 {System.Generics.Collections}TObjectList<dbconnection.TDBConnection>.Notify
00861eb0 heidisql32.r5049.exe dbconnection 728 +0 {System.Generics.Collections}TList<dbconnection.TDBConnection>.DeleteRange
00861508 heidisql32.r5049.exe dbconnection 38 +0 {System.Generics.Collections}TList<dbconnection.TDBConnection>.SetCount
0067b8a1 heidisql32.r5049.exe Vcl.Forms TCustomForm.DoDestroy
0067b6f2 heidisql32.r5049.exe Vcl.Forms TCustomForm.Destroy
004a6a99 heidisql32.r5049.exe madExcept InterceptClassDestroy
004084b0 heidisql32.r5049.exe System 196 +0 TObject.Free
0053a47f heidisql32.r5049.exe System.Classes TComponent.DestroyComponents
00679481 heidisql32.r5049.exe Vcl.Forms DoneApplication
0044c3a1 heidisql32.r5049.exe System.SysUtils DoExitProc
00409fe9 heidisql32.r5049.exe System 196 +0 @Halt0
00986a8d heidisql32.r5049.exe heidisql 80 +26 initialization
766e38f2 KERNEL32.DLL BaseThreadInitThunk
Yes, that's a known issue in the 32bit version of heidisql.exe/libpq.dll. So, that's normal for now. The important thing is you have the 32bit version of libpq.dll while you had the 64bit version of heidisql.exe before, which cannot run obviously. Glad you found the right file :)
See http://www.heidisql.com/forum.php?t=21039 and r5068 - updating to the latest build should fix these "cannot find a usable libpq.dll".
This still occurs on windows 7 sp1 using the 32+64bit (yyyy_Setup.exe) installer. Uninstalling and reinstalling does not fix this. Neither does adding the HeidiSQL directory to the path and restarting. Only the yyyy-32_Setup.exe one works. Just tested this again with 9.4.0.5133 (latest nightly).
Are you sure the latest build still yields this error?
Cannot find a usable libpq.dll
Please see my change in r5132:
Try to load libpq.dll with explicit file path if the path-less did not succeed. See http://www.heidisql.com/forum.php?t=22514
I'm seeing this error (on build 9.4.0.5139). It might result from trying to connect to a PostgreSQL server (Amazon Redshift) without specifying a database name in the session, but I can't consistently replicate that.
Log window says / Trying to load library with full path: C:\Program Files\HeidiSQL\libpq.dll /. The DLL file is there.
No errors connecting to a few different MySQL servers.
Running Windows 10 Pro (build 14393) on 64-bit Dell Precision M3800.
Yes, that's what the download page says:
Connecting to PostgreSQL may require to have Visual C++ Redistributable Package installed
But I guess noone reads that. Maybe the HeidiSQL installer should come itself with that VC redist package and install it when not done already?
Actually, I did not read everything: I clicked directly on the download link :) It may not be a bad idea to provide all the prerequisites with the installer: the error message let us think that there is a bug with HeidiSQL, not an unsatisfied dependency.
Anyway: thanks a lot for this great product!
Give the user a hint to download VC redistributable if PostgreSQL dll fails to assign a procedure. See https://www.heidisql.com/forum.php?t=18580#p34297
You could post that image on https://github.com/RRUZ/vcl-styles-utils/issues and mention that it's a TTaskDialog
with enabled tfEnableHyperlinks
. HeidiSQL uses these VCL style fixes.
Please login to leave a reply, or register at first.