[python-win32] adodbapi returns None for text field in first row
Halgrim, Scott
halgrim.s at ghc.org
Fri Dec 31 00:07:34 CET 2010
Has anybody ever had an issue like this?
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.
I'm running adodbapi 2.4 and querying SQL Server 2008. Here's my code.
>>> from adodbapi import connect
>>> cnctn = connect('Data Source=InstanceName;Initial Catalog=DbName;' + 'Trusted_Connection=true;')
>>> crsr = cnctn.cursor()
>>> query = 'SELECT fword, text, cui FROM TABLE'
>>> c.execute(query)
>>> rows = c.fetchall()
>>> print rows[0], rows[1]
(u'breast', None, u'C0006142') (u'breast', u'breast carcinoma', u'C0006142')
Any help is appreciated.
Thanks,
Scott
________________________________
GHC Confidentiality Statement
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20101230/8b207321/attachment.html>
More information about the python-win32
mailing list