Skip to content

Commit a763fd1

Browse files
committed
fix: wrong SQL on MS SQL when renaming table per table editor
Refs #1997
1 parent 153e61d commit a763fd1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

source/table_editor.pas

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,10 @@ function TfrmTableEditor.ApplyModifications: TModalResult;
529529
end;
530530
// Rename table
531531
if ObjectExists and (editName.Text <> DBObject.Name) then begin
532-
Rename := DBObject.Connection.SqlProvider.GetSql(qRenameTable, [DBObject.QuotedName, DBObject.Connection.QuoteIdent(editName.Text)]);
532+
Rename := DBObject.Connection.SqlProvider.GetSql(qRenameTable, [
533+
DBObject.QuotedName(True, False),
534+
DBObject.Connection.QuoteIdent(editName.Text)
535+
]);
533536
DBObject.Connection.Query(Rename);
534537
DBObject.Connection.ShowWarnings;
535538
end;

0 commit comments

Comments
 (0)