datetime is causing error with pyodbc/freeTDS when accessing MSSQL

Thang Nguyen <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Hi,
I am getting an error accessing MSSQL database using pyodbc/FreeTDS
driver.  Looks like it has something to do with datetime datatype.
If I delete the "created_at" column (which has datetime data type)
from my table then
the same code will work. Any suggestion for further debugging?  Thanks
in advance.   -- TN

pyodbc:  pyodbc-2.1.8-py2.5-linux-x86_64.egg
TDS:      freetds-0.82
MSSQL 2005

here is the python code:
==================
import pyodbc
conn =
pyodbc.connect("DRIVER={FreeTDS};SERVER=myserver;DATABASE=mydatabase;PORT=1435;UID=MYUSER;PWD=MYPASS1")
cursor = conn.cursor()
cursor.execute("select * from test_product")
print cursor.fetchone()

Here is the error:
============
Traceback (most recent call last):
  File "testodbc2.py", line 7, in <module>
    print cursor.fetchone()
pyodbc.Error: ('HY000', 'The driver did not supply an error!')

Here is the "test_product" database table:
===============
Column name      Data Type             Value
device                 varchar(8)              xyz
revision               varchar(8)              ttt
process               varchar(10)            abc
created_at            datetime                4/26/2011 12:20:00 PM
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.