On Sep 19, 10:06 am, "exhuma.twn" <[EMAIL PROTECTED]> wrote:
> And before someone says: "Use the DictCursor-factory to access column
> names". Yes I can do that. But a dict does not guarantee the same
> order of keys as the columns were specified in the query.

But you can iterate over the cursor.description sequence and then look
up the column value (by name or index).  I haven't specifically tried
this with your setup but I have used it with various DBAPI2 compliant
modules.  (SQLite, pyodbc, win32 odbc, etc)  There are lots of goodies
in the cursor.description but each implementation varies on what it
provides.  Check out the PEP for more info.

http://www.python.org/dev/peps/pep-0249/

HTH.
Jay

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to