mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Fix bug #1856457 "Incorect table creation queries / wrong error handling"
Solution: Just keep CreateTableForm open after firing a faulty CREATE TABLE statement. Note: The "Create" button has ModalResult := mrOK, so the form is automatically closed in the normal case.
This commit is contained in:
@@ -243,12 +243,13 @@ begin
|
||||
// Execute CREATE statement and reload tablesList
|
||||
try
|
||||
Mainform.Childwin.ActiveDatabase := DBComboBox.Text;
|
||||
Mainform.ChildWin.ExecUpdateQuery( createQuery );
|
||||
Mainform.ChildWin.ExecUpdateQuery( createQuery, False, True );
|
||||
Mainform.ChildWin.MenuRefreshClick(sender);
|
||||
Mainform.ChildWin.SelectedTable := EditTablename.Text;
|
||||
Mainform.ChildWin.ShowTable(EditTablename.Text);
|
||||
Close;
|
||||
except on E: THandledSQLError do;
|
||||
except on E: THandledSQLError do
|
||||
// Keep the form open so the user can fix his faulty input
|
||||
ModalResult := mrNone;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user