mxODBC support sql command in Unicode?

Li Lin tb_lin at hotmail.com
Tue May 29 14:38:53 EDT 2001


Hi,

Just downloaded latest mxODBC module, and have a problem here:
#I'm on Win2K, latest ActivePython binary distro
conn = Windows.connect(...)
cursor = conn.cursor()
cursor.execute(u'select * from my table')
...
I get an error message like:
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: SQL command must be a string

so, does mxODBC cursor support a sql command string in unicode? I got
the same error message regardless of underlying database driver I'm
using ( I used ODBC drivers from Oracle 8.1.7, MS SQL 7.0, Sybase ASE
11.x), so I wonder if it's a limitation of mxODBC?

Is there a work around for this? 

Thanks.

--Li Lin



More information about the Python-list mailing list