title: Problem with SELECT * in MySQL through ODBC from Microsoft SQL Server
body: <p>I have a MySQL server as a linked server in Microsoft SQL Server 2008.  For the link I use MySQL ODBC Connector version 5.1.8.  When invoking queries using <code>OPENQUERY</code> (the only way I found of performing queries), problems occur. Simple queries, such as</p>
  
  <pre><code>SELECT * FROM OPENQUERY(MYSQL, 'SHOW TABLES')
  </code></pre>
  
  <p>work fine. Selection of individual columns, e.g.,</p>
  
  <pre><code>SELECT * FROM OPENQUERY(MYSQL, 'SELECT nr FROM letter')
  </code></pre>
  
  <p>works fine as well, but SELECT * syntax does not work. The query:</p>
  
  <pre><code>SELECT * FROM OPENQUERY(MYSQL, 'SELECT * FROM mytable')
  </code></pre>
  
  <p>raises an error:</p>
  
  <blockquote>
    <p>Msg 7347, Level 16, State 1, Line 6
    OLE DB provider 'MSDASQL' for linked
    server 'MYSQL' returned data that does
    not match expected data length for
    column '[MSDASQL].let_nr'. The
    (maximum) expected data length is 40,
    while the returned data length is 0.</p>
  </blockquote>
  
  <p>How can I make the SELECT * syntax work?</p>