Wrap grid export code in a try/except block, so we can catch a potential "Cannot determine name of table" error, occurring while trying to get the WHERE clause for DELETEs. See http://www.heidisql.com/forum.php?t=21168

This commit is contained in:
Ansgar Becker
2016-04-28 18:13:47 +00:00
parent dec6f9ee63
commit b5de17c15d

View File

@ -482,6 +482,7 @@ begin
Exit;
end;
try
Screen.Cursor := crHourglass;
SelectionOnly := grpSelection.ItemIndex = 0;
@ -947,10 +948,20 @@ begin
end;
end;
end;
Mainform.DisableProgress;
Mainform.ShowStatusMsg(_('Freeing data...'));
FreeAndNil(S);
except
// Whole export code wrapped here
on E:EDatabaseError do begin
Screen.Cursor := crDefault;
ErrorDialog(E.Message);
end
else
raise;
end;
Mainform.DisableProgress;
Mainform.ShowStatusMsg;
Screen.Cursor := crDefault;
end;