mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user