varchar(max) columns are like CLOBs, character large objects, and I&#39;m not sure how well that odbc module handles them.   I ended up switching to pyODBC which does handle them.  Unfortunately it might not be just a drop-in replacement, and pyODBC does have its own issues.  But so far it&#39;s working pretty well for us. <br>
<br><a href="http://code.google.com/p/pyodbc/">http://code.google.com/p/pyodbc/</a><br><br><br><div class="gmail_quote">On Thu, May 27, 2010 at 10:56 AM, John <span dir="ltr">&lt;<a href="mailto:john@saponara.net">john@saponara.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br>
<br>
When a ms sql server database column was changed to varchar(max), my python code became unable to read that column.  no matter the actual value, python sees it as &#39;\x00&#39;.  I use sql server 2008, python 2.4, and pywin32-214.  it had worked when the column was a fixed size varchar, eg varchar(1000).  essentially my code is:<br>

<br>
connectionString=r&quot;driver={SQL Server Native Client 10.0};server=...;uid=...;pwd=...;database=...&quot;<br>
connection=odbc.odbc(connectionString)<br>
cursor=connection.cursor<br>
cursor.execute(&quot;select ...&quot;)<br>
cursor.fetchall()<br>
<br>
Could anyone suggest what the problem might be?<br>
<br>
Thanks,<br>
John<br>
<br>
<br></blockquote><br></div>