title: unixODBC error IM001
body: <p>I get the following error when trying to do any simple query.  I just can't figure out what's changed.</p>
  
  <p>Here is an example of the sqlalchemy (Elixir) class:</p>
  
  <pre><code>class Song(Entity):
      using_options(tablename='tbSongs', autoload=True)
      using_table_options(schema='apra')
  </code></pre>
  
  <p>The database connection is ok and the classes construct ok because I can do <code>dir(Song)</code> and see all the correct columns.  However, a simple query won't work.</p>
  
  <p>Here is a query on that class and the resulting output:</p>
  
  <pre><code>&gt;&gt;&gt; songs = Song.query.all()
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 1729, in all
      return list(self)
    File "/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 1839, in __iter__
      return self._execute_and_instances(context)
    File "/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 1854, in _execute_and_instances
      result = conn.execute(querycontext.statement, self._params)
    File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1399, in execute
      params)
    File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1532, in _execute_clauseelement
      compiled_sql, distilled_params
    File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1640, in _execute_context
      context)
    File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1633, in _execute_context
      context)
    File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 325, in do_execute
      cursor.execute(statement, parameters)
  sqlalchemy.exc.DBAPIError: (Error) ('IM001', '[IM001] [unixODBC][Driver Manager]Driver does not support this function (0) (SQLColAttribute)') 'SELECT [tbSongs_1].[ID_Song] AS [apra_tbSongs_ID_Song], [tbSongs_1].[Album] AS [apra_tbSongs_Album], [tbSongs_1].[Title] AS [apra_tbSongs_Title], [tbSongs_1].[Composer] AS [apra_tbSongs_Composer], [tbSongs_1].[Performer] AS [apra_tbSongs_Performer], [tbSongs_1].[TrackNumber] AS [apra_tbSongs_TrackNumber], [tbSongs_1].[Duration] AS [apra_tbSongs_Duration], [tbSongs_1].[RecordLabel] AS [apra_tbSongs_RecordLabel], [tbSongs_1].[Notes] AS [apra_tbSongs_Notes], [tbSongs_1].[Class] AS [apra_tbSongs_Class], [tbSongs_1].[SongID] AS [apra_tbSongs_SongID], [tbSongs_1].[Deleted] AS [apra_tbSongs_Deleted] \nFROM apra.[tbSongs] AS [tbSongs_1]' ()
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>Setup details:</p>
  
  <ul>
  <li>32bit Arch Linux</li>
  <li>Python 2.7.2</li>
  <li>sqlalchemy 0.7.2</li>
  <li>elixir 0.7.1</li>
  <li>FreeTDS 0.82-5</li>
  <li>unixodbc 2.3.0-1</li>
  </ul>
  
  <p>/etc/odbcinst.ini:</p>
  
  <pre><code>[ODBC Drivers]
  tds = Installed
  [tds]
  Driver = /usr/lib/libtdsodbc.so
  Setup = /usr/lib/libtdsodbc.so
  </code></pre>
  
  <p>/etc/odbc.ini:</p>
  
  <pre><code>[ODBC]
  Trace = 0
  [DBNAME]
  Driver = TDS
  Trace = No
  Server = xx.xx.xx.xx\dbname
  Database = dbname
  Port = 1433
  </code></pre>