Hi,

when I try to connect with sqlalchemy and mssql+pyodbc I get this exeption:
"TypeError: The first argument to execute must be a string or unicode 
query".

It works if I only use pyodbc.

E.g.
>>> conn = pyodbc.connect('DRIVER={SQL 
Server};Server=127.0.0.1;Database=BOM;UID=guest;PWD=guest')
>>> cursor = conn.cursor()
>>> cursor.execute("select * from Objects")
>>> result = cursor.fetchone()

-> now `result` is a result from the database as it should be.

When I try to connect with sqlalchemy:

>>> engine = 
sqlalchemy.create_engine('mssql+pyodbc://guest:guest@127.0.0.1/BOM')
>>> engine.execute("select * from Objects")

-> The above TypeError exception (complete 
traceback: http://pastebin.com/PHxbynFt )

Not sure if this bug is related: http://www.sqlalchemy.org/trac/ticket/2355

Any ideas what could be wrong and how to fix it?
I would really like to stick with python3 ;)

Thanks,
  Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to