Skip to content

SqlServer: Treat String literal as unicode by default#4667

Merged
smitpatel merged 1 commit intodevfrom
unicodeQuery
Mar 2, 2016
Merged

SqlServer: Treat String literal as unicode by default#4667
smitpatel merged 1 commit intodevfrom
unicodeQuery

Conversation

@smitpatel
Copy link
Contributor

resolves #4622

.AppendLine("FROM [sys].[default_constraints] [d]")
.AppendLine("INNER JOIN [sys].[columns] [c] ON [d].[parent_column_id] = [c].[column_id]")
.Append("WHERE ([d].[parent_object_id] = OBJECT_ID(N'");
.Append("WHERE ([d].[parent_object_id] = OBJECT_ID('");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whenever we are using EscapeLiteral, shouldn't we keep the "N"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Will update at all places affected.

builder
.Append(SqlGenerationHelper.EscapeLiteral(tableName))
.Append("') AND [c].[name] = N'")
.Append("') AND [c].[name] = '")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here also. Seems like we shouldn't change this line because EscapeLiteral doesn't add "N'".

@natemcmaster
Copy link
Contributor

:shipit: with those changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants