Skip to content

Commit dbce6b5

Browse files
committed
fix: wrong SQL on MS SQL when renaming table per table editor
Refs #1997
1 parent 7d828d2 commit dbce6b5

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
@@ -523,7 +523,10 @@ function TfrmTableEditor.ApplyModifications: TModalResult;
523523
end;
524524
// Rename table
525525
if ObjectExists and (editName.Text <> DBObject.Name) then begin
526-
Rename := DBObject.Connection.SqlProvider.GetSql(qRenameTable, [DBObject.QuotedName, DBObject.Connection.QuoteIdent(editName.Text)]);
526+
Rename := DBObject.Connection.SqlProvider.GetSql(qRenameTable, [
527+
DBObject.QuotedName(True, False),
528+
DBObject.Connection.QuoteIdent(editName.Text)
529+
]);
527530
DBObject.Connection.Query(Rename);
528531
DBObject.Connection.ShowWarnings;
529532
end;

0 commit comments

Comments
 (0)