title: Using row.ColumnName on a column with spaces, after a select query generated by C# in WebMatrix
body: <p>I have compiled a string that queries a database like so:</p>
  
  <pre><code>stringCompiler = "SELECT * FROM SomeTable";
  </code></pre>
  
  <p>The problem is that some of the columns have spaces in their names (i.e., "City Tag Number").</p>
  
  <p>How can I call this later after I use the db.Query statement. Example:</p>
  
  <pre><code>foreach(var row in db.Query(stringCompiler))
  {
      var someVariable = row.Column With Spaces;
  }
  </code></pre>
  
  <p>Obviously the above code would produce an error.</p>
  
  <p>I could go through each column instead of using ' * ', all the while assigning aliases to all of the column names with spaces in them. Example:</p>
  
  <pre><code>stringCompiler = "SELECT \"City Tag Number\" AS CityTagNumber, ...";
  </code></pre>
  
  <p>But there are a lot of column names in this table and I am assuming there is a better way, and that I just can't find it (I promise, I've looked).</p>
  
  <p>Any help is much appreciated.</p>
  
  <p>----------------EDIT------------------------</p>
  
  <p>I should've specified that I was using SqlServer.</p>