Issue 74: Issue with executing query
Status:  NoFix
Owner: ----
Closed:  Dec 2009
Reported by sucking....@gmail.com, Oct 27, 2009
When trying to submit a python dictionary which is nested inside a list,
I get the following error:

The first argument to execute must be a string or unicode query.


I use the latest pyodbc pre-compiled version for python 2.6.2 on Win7.
MySQL came with the current xampp-package and uses default settings.




Oct 27, 2009
Project Member #1 mkleehammer
Two things:

(1) The error message is saying that the first argument must be the actual SQL and it
must be a string or Unicode value: cursor.execute("select * from x").  The error is
saying you passed something else.

(2) pyodbc only supports a SQL interface -- you won't be able to pass dictionaries,
etc.  Are you sure you are using the right product?  You might be looking for
something like SQLObject or something.

If you still think there is a pyodbc problem, past a bit of the code here so we can
see.  Also, for help from lots of people, you might find the pyodbc discussion group
handy: http://groups.google.com/group/pyodbc
Status: Investigating
Dec 31, 2009
Project Member #2 mkleehammer
Need more information, so closing as invalid for now.  Reopen if you need to.
Status: Invalid
Nov 21, 2010
Project Member #3 mkleehammer
(No comment was entered for this change.)
Status: NoFix