Scott:<br> Something is indeed fishy. What os, version of python, and version of pywin32 are you using?<br>As an attempt to duplicate your result, I built a table "tblTemp" on my Windows Vista laptop's SQL express 2008 with three VarChar fields<br>
and loaded two rows of data. I defined an ODBC DSN to point to my local server, since you are running in ODBC mode.<br><br>I added some debug details to your sample, corrected a typo, altered the database info, and ran the following...<br>
<br><python program x.py><br>#Note: odbcTest is a DSN defined using "Control Panel"->"Administrative Tools"->"Data Sources (ODBC)"<br>connStrSQLServer = 'Data Source=odbcTest;Initial Catalog=Northwind;' + 'Trusted_Connection=true;'<br>
import sys<br>print sys.version<br>import adodbapi<br>print 'adodbapi version=',adodbapi.version<br>adodbapi.adodbapi.verbose = 4<br><br>cnctn = adodbapi.connect(connStrSQLServer)<br>c = cnctn.cursor() # Note: corrected from crsr = cnctn.cursor()<br>
query = 'SELECT fword, text, cui FROM TblTemp'<br>c.execute(query)<br>print 'description=',repr(c.description)<br>rows = c.fetchall()<br>print repr(rows[0])<br>print repr(rows[1])<br>c.close()<br>cnctn.close()<br>
</python><br><br>I got this result... <br><br><console dump><br>C:\hg\adodbapi\test>c:\python26\python.exe x.py<br>2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]<br>adodbapi version= adodbapi v2.4.0.2<br>
adodbapi v2.4.0.2 attempting: "Data Source=odbcTest;Initial Catalog=Northwind;Tusted_Connection=true;"<br>adodbapi New connection at 2C70450<br>adodbapi New cursor at 2C70BF0 on conn 2C70450<br>Executing command="SELECT fword, text, cui FROM TblTemp"<br>
with parameters= []<br>description= [(u'fword', 200, 6, 10, 255, 255, True), (u'text', 200, 15, 30, 255, 255, True), (u'cui', 200, 8, 12, 255, 255, True)]<br><SQLrow={fword:u'breast', text:u'what goes here?', cui:u'C0006142'}><br>
<SQLrow={fword:u'breast', text:u'breast carcinoma', cui:u'C0006142'}><br>adodbapi Closed connection at 2C70450<br><br></console dump><br><br>Try again with verbose=4 all of the "print repr(..." lines added, and see if the additional information helps.<br>
--<br>Vernon<br><br><div class="gmail_quote">On Thu, Dec 30, 2010 at 4:07 PM, Halgrim, Scott <span dir="ltr"><<a href="mailto:halgrim.s@ghc.org">halgrim.s@ghc.org</a>></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;">
<div>
<font size="2" face="Arial, sans-serif">
<div>Has anybody ever had an issue like this?</div>
<div><font size="3" face="Times New Roman, serif"> </font></div>
<div>I submit a query to a table and everything works out fine, except for one column in one row. The column of type text in the first row returned is always None. I’ve modified the query by adding a WHERE clause so that a different row was the first one
returned, and the same thing happens where the first row returned has a None in that column.</div>
<div> </div>
<div>I’m running adodbapi 2.4 and querying SQL Server 2008. Here’s my code.</div>
<div><font size="3" face="Times New Roman, serif"> </font></div>
<div>>>> from adodbapi import connect</div>
<div>>>> cnctn = connect('Data Source=InstanceName;Initial Catalog=DbName;' + 'Trusted_Connection=true;')</div>
<div>>>> crsr = cnctn.cursor()</div>
<div>>>> query = 'SELECT fword, text, cui FROM TABLE'</div>
<div>>>> c.execute(query)</div>
<div>>>> rows = c.fetchall()</div>
<div>>>> print rows[0], rows[1]</div>
<div>(u'breast', None, u'C0006142') (u'breast', u'breast carcinoma', u'C0006142')</div>
<div><font size="3" face="Times New Roman, serif"> </font></div>
<div>Any help is appreciated.</div>
<div> </div>
<div>Thanks,</div>
<div> </div>
<div>Scott</div>
<div><font size="3" face="Times New Roman, serif"> </font></div>
<div><font size="3" face="Times New Roman, serif"><br>
</font></div>
<div><font size="3" face="Times New Roman, serif"><u> ________________________________ </u></font></div>
<div><font color="#808080" face="Verdana, sans-serif">GHC Confidentiality Statement<br>
<br>
This message and any attached files might contain confidential information protected by federal and state law. The information is intended only for the use of the individual(s) or entities originally named as addressees. The improper disclosure of such information
may be subject to civil or criminal penalties. If this message reached you in error, please contact the sender and destroy this message. Disclosing, copying, forwarding, or distributing the information by unauthorized individuals or entities is strictly prohibited
by law.<br>
</font></div>
</font>
</div>
<br>_______________________________________________<br>
python-win32 mailing list<br>
<a href="mailto:python-win32@python.org">python-win32@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-win32" target="_blank">http://mail.python.org/mailman/listinfo/python-win32</a><br>
<br></blockquote></div><br>