title: how to get the value of a column in recordset with space in the name?
body: <p>we have change the server of our client, i'm trying to get rid of all the errors i got in the new server, i've got this situation:</p>
  
  <p>yesterday, on the old server this works fine:</p>
  
  <pre><code>sql = "SELECT * FROM tableName INNER JOIN tableName2 ON tableName.Code = tableName2.[Global dimension 1 code] WHERE [No_]="&amp;request("aNumber")
  set rs = conn.execute(sql)
  
  if not rs.EOF then
  subCat = rs("Global dimension 1 code")
  else
  subCat = 0
  end if
  </code></pre>
  
  <p>today, on the new server with IIS6 and same sql server 2008 as the oldone, i get the variable "subCat" empty, BUT if i write:</p>
  
  <pre><code>subCat = rs("code")
  </code></pre>
  
  <p>it goes good. Also:</p>
  
  <pre><code>do until rs.EOF
    for each x in rs.Fields
      Response.Write(x.name)
      Response.Write(" = ")
      Response.Write(x.value &amp; "&lt;br&gt;")
    next
    Response.Write("&lt;br&gt;")
    rs.MoveNext
    loop
  </code></pre>
  
  <p>gives all the columns, also those with spaces, and things like:</p>
  
  <pre><code>subCat = rs("[Global dimension 1 code]")
  subCat = rs("'Global dimension 1 code'")
  subCat = rs("[tableName].[Global dimension 1 code]")
  </code></pre>
  
  <p>rise a 500 server error.</p>
  
  <p>anyone has a hint to point a column in recordset with spaces? i'm usign ASP classic.
  thanks in advance.</p>