title: How to query for a MS Access column whose name has a question mark, via ODBC?
body: <p>I have a MS Access database (Access 2002, for the record).  It has a column whose name contains a question mark, say, for example table "Users" with columns "uid" and "isAdmin?".  I need to connect to this database via ODBC, and query for this column, along the following lines: </p>
  
  <pre><code>select [uid], [isAdmin?] from Users order by [isAdmin?];</code></pre>
  
  <p>How do I escape the question mark in the column name, so that the MS Access ODBC driver doesn't think that it's a query parameter?  This query doesn't use any parameters, so it's fine if I disable them entirely.</p>
  
  <p>Some limitations:</p>
  
  <ul>
  <li>I can't easily change the column names.</li>
  <li>I can't easily use something other than ODBC to connect, though this is probably my fallback plan if I can't get ODBC to behave.</li>
  <li>I can't just say <code>select * from Users</code> -- it'd still choke on the order by (which is complicated in the real query, so really needs to be done in SQL).</li>
  </ul>
  
  <p>Things I've tried that don't work:</p>
  
  <ul>
  <li><code>select [uid], '[isAdmin?]' from Users;</code> -- this makes the second column be the string "[isAdmin?]"</li>
  <li><code>select [uid], ['isAdmin?'] from Users;</code></li>
  <li><code>select [uid], [isAdmin\?] from Users;</code></li>
  <li><code>select [uid], [isAdmin\?] {escape '\'} from Users;</code> -- nor does any other escape char work.</li>
  <li><code>select [uid], { [isAdmin?] } from Users;</code></li>
  </ul>
  
  <p><strong>EDIT</strong>: I should have clarified, I can't easily change the database much at all, except via ODBC (or ADO or DAO or whatever, but that'll be a bit tricky, and at that point I can just run the query through those).</p>