mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-18 05:18:33 +08:00
A yes/no message dialog may also return mrCancel, when the user clicks the X button to close it. Handle this case as if the user clicked "no", when HeidiSQL detects an unsafe query. See http://www.heidisql.com/forum.php?t=19697
This commit is contained in:
@ -2492,12 +2492,7 @@ begin
|
|||||||
if ContainsUnsafeQueries then begin
|
if ContainsUnsafeQueries then begin
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
msg := _('Your query contains UPDATEs and/or DELETEs without a WHERE clause. Please confirm that you know what you''re doing.');
|
msg := _('Your query contains UPDATEs and/or DELETEs without a WHERE clause. Please confirm that you know what you''re doing.');
|
||||||
case MessageDialog(_('Unsafe queries found'), msg, mtConfirmation, [mbYes, mbNo], asWarnUnsafeUpdates) of
|
DoExecute := MessageDialog(_('Unsafe queries found'), msg, mtConfirmation, [mbYes, mbNo], asWarnUnsafeUpdates) = mrYes;
|
||||||
mrYes:
|
|
||||||
DoExecute := True; // Proceed to query execution below
|
|
||||||
mrNo:
|
|
||||||
DoExecute := False;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user