Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

put [] around the table name in the CreateInsertCommand #158

Merged
merged 1 commit into from

2 participants

@eiu165

we had a table called Order which is a keyword in sql.
using [] around the table name will allow for a statement like this.
INSERT INTO Order VALUES ('Hat')

@eiu165 eiu165 put [] around table name
we had a table called Order which is a keyword in sql.
using [] around the table name will allow for a statement like this.
INSERT INTO [Order] (Product) VALUES ('Hat')
ce1d125
@robconery robconery merged commit e120625 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 2, 2012
  1. @eiu165

    put [] around table name

    eiu165 authored
    we had a table called Order which is a keyword in sql.
    using [] around the table name will allow for a statement like this.
    INSERT INTO [Order] (Product) VALUES ('Hat')
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  Massive.cs
View
2  Massive.cs
@@ -424,7 +424,7 @@ private dynamic BuildPagedResult(string sql = "", string primaryKeyField = "", s
var settings = (IDictionary<string, object>)expando;
var sbKeys = new StringBuilder();
var sbVals = new StringBuilder();
- var stub = "INSERT INTO {0} ({1}) \r\n VALUES ({2})";
+ var stub = "INSERT INTO [{0}] ({1}) \r\n VALUES ({2})";
result = CreateCommand(stub, null);
int counter = 0;
foreach (var item in settings) {
Something went wrong with that request. Please try again.