mxODBC support sql command in Unicode?
mal at lemburg.com
Tue May 29 22:47:52 CEST 2001
Li Lin wrote:
> 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?
mxODBC currently only supports Unicode in parameters passed
to the statement and columns fetched from the result set and
then only if the ODBC driver supports this (most don't).
The reason for not supporting Unicode as statement is that
this would require using ODBC Unicode APIs which is currently
BTW, why would you want to write SQL in Unicode ?
CEO eGenix.com Software GmbH
Company & Consulting: http://www.egenix.com/
Python Software: http://www.lemburg.com/python/
More information about the Python-list