Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add square brackets around tablename #246

Merged
merged 7 commits into from
Oct 8, 2019

Conversation

yukiwongky
Copy link
Contributor

Fix #221

@yukiwongky yukiwongky changed the title add square braket around tablename Add square brackets around tablename Oct 4, 2019
@Wraith2
Copy link
Contributor

Wraith2 commented Oct 5, 2019

Looks good to me..

There's a minor optimization opportunity available if you want it. If you split BuildMultiPartName into two method as done in corefx here you will have AppendQuotedString which you can use to directly write the name part to the StringBuilder without needing to allocate the intermediate string.

You can also remove the updateBulkCommandText.AppendFormat and replace it with simple repeated Appends which will avoid the string scanning to find the format specifiers.

@ErikEJ
Copy link
Contributor

ErikEJ commented Oct 5, 2019

No tests?

@yukiwongky
Copy link
Contributor Author

@ErikEJ I'm working on a test now. It'll be added to the next iteration.

@cheenamalhotra cheenamalhotra added this to In progress in SqlClient v1.1.0 via automation Oct 7, 2019
@cheenamalhotra cheenamalhotra added this to the 1.1.0-preview2 milestone Oct 7, 2019
@yukiwongky yukiwongky merged commit 78a4ea4 into dotnet:master Oct 8, 2019
SqlClient v1.1.0 automation moved this from In progress to Done Oct 8, 2019
yukiwongky added a commit to yukiwongky/SqlClient that referenced this pull request Nov 5, 2019
* add square braket around tablename

* add test

* fix test

* change test name to something more meaningful

* remove special characters in some table name

* make new test run on azure as well
@yukiwongky yukiwongky deleted the escapetable branch November 7, 2019 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

InvalidOperationException(SqlException) on SqlBulkCopy
4 participants