Skip to content
Permalink
Browse files

PostgreSQL libraries: give the user the hint to VC redistributable on…

… any dll loading error. Not just when a procedure could not be assigned. If VC is missing, the user may get "The specified module was not found", just like when the main dll is missing.
  • Loading branch information
ansgarbecker committed Feb 25, 2020
1 parent 71ca19a commit fdc1118c964fc0b37baa3a130d3284c9356e9579
Showing with 11 additions and 6 deletions.
  1. +3 −3 out/locale/en/LC_MESSAGES/default.po
  2. +8 −3 source/dbconnection.pas
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: HeidiSQL\n"
"POT-Creation-Date: 2012-11-05 21:40\n"
"PO-Revision-Date: 2020-02-22 08:21+0100\n"
"PO-Revision-Date: 2020-02-25 21:25+0100\n"
"Last-Translator: Ansgar Becker <anse@heidisql.com>\n"
"Language-Team: English (http://www.transifex.com/projects/p/heidisql/language/en/)\n"
"MIME-Version: 1.0\n"
@@ -3963,8 +3963,8 @@ msgid "Assign procedure \"%s\""
msgstr "Assign procedure \"%s\""

#: dbconnection.pas:1047
msgid "Your %s is out-dated or somehow incompatible to %s. Please use the one from the installer, or just reinstall %s."
msgstr "Your %s is out-dated or somehow incompatible to %s. Please use the one from the installer, or just reinstall %s."
msgid "Your %s is incompatible to %s, or your system is missing a dependent library."
msgstr "Your %s is incompatible to %s, or your system is missing a dependent library."

#: dbconnection.pas:1121
msgid "SSL parameters successfully set."
@@ -2620,13 +2620,18 @@ procedure TPgConnection.DoBeforeConnect;
Log(lcDebug, FLib.DllFile + ' v' + IntToStr(FLib.PQlibVersion) + ' loaded.');
except
on E:EDbError do begin
// Try to explain what may cause this error
msg := E.Message;
if E.ErrorCode = TDbLib.LIB_PROC_ERROR then begin
msg := msg + sLineBreak + sLineBreak +
f_('Installing %s might help. Please download from %s',
['VC Redistributable', 'https://support.microsoft.com/en-us/help/3179560/update-for-visual-c-2013-and-visual-c-redistributable-package']
);
f_('Your %s is incompatible to %s, or your system is missing a dependent library.',
[Parameters.LibraryOrProvider, APPNAME]);
end;
// In any case:
msg := msg + sLineBreak + sLineBreak +
f_('Installing %s might help. Please download from %s',
['VC Redistributable', 'https://support.microsoft.com/en-us/help/3179560/update-for-visual-c-2013-and-visual-c-redistributable-package']
);
raise EDbError.Create(msg, E.ErrorCode);
end;
end;

0 comments on commit fdc1118

Please sign in to comment.
You can’t perform that action at this time.