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;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
Screen.Cursor := crHourglass;
|
Screen.Cursor := crHourglass;
|
||||||
|
|
||||||
SelectionOnly := grpSelection.ItemIndex = 0;
|
SelectionOnly := grpSelection.ItemIndex = 0;
|
||||||
@ -947,10 +948,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Mainform.DisableProgress;
|
|
||||||
Mainform.ShowStatusMsg(_('Freeing data...'));
|
Mainform.ShowStatusMsg(_('Freeing data...'));
|
||||||
FreeAndNil(S);
|
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;
|
Mainform.ShowStatusMsg;
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user