Skip to content
Permalink
Browse files

Display last system error when plink process could not be started for…

… some reason. Helps in debugging. See https://www.heidisql.com/forum.php?t=34556#p35000
  • Loading branch information
ansgarbecker committed Nov 20, 2019
1 parent 35a27c0 commit 96aca7f6a28ad3fd1fe72177715e3333d5df9762
Showing with 3 additions and 1 deletion.
  1. +3 −1 source/dbconnection.pas
@@ -871,7 +871,9 @@ procedure TPlink.Connect;
PChar(GetCurrentDir),
StartupInfo,
FProcessInfo) then begin
raise EDbError.CreateFmt(_('Could not execute PLink: %s'), [CRLF+PlinkCmdDisplay]);
ErrorText := CRLF + CRLF + PlinkCmdDisplay + CRLF + CRLF + 'System message: ' + SysErrorMessage(GetLastError);
ErrorText := f_('Could not execute PLink: %s', [ErrorText]);
raise EDbError.Create(ErrorText);
end;

// Wait until timeout has finished, or some text returned.

0 comments on commit 96aca7f

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