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:
Ansgar Becker
2008-01-11 20:39:23 +00:00
parent a580043f9c
commit a79ac546e5

View File

@@ -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;