When I'm implementin on C my Python module that are used to access ODBC 2.0 database, I can't found description in PEP-0249 about the case when one .executeXXX follows another on the same cursor object.
I think that after .executeXXX cursor can only be fetchedXXX or closed. Reexecution permited and raised exception. That's because .executeXXX method calling SQLPrepare and and next SQLPrepare posible only when SQLCloseCursor() or SQLFreeStmt() with the SQL_CLOSE option called. But on C-level reexecution is posible. "Once the application has processed the results from the SQLExecute() call, it can execute the statement again with new (or the same) parameter values." Problem is that no .Prepare(Statement) method is not present in Cursor oblect. I think it will be better if connection method of cursor have to do the SQLPrepare and only prepare the statemnet when creatin new python cursor object C = cnxn.cursor(STATEMENT), and C.execute([parameters]) will only execute or reexecute the statemnet with optional parameters list.
_______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig