DBI cursor behaviour with multiple statements?
Henrik.Weber at sys.aok.de
Fri Sep 27 11:37:25 CEST 2002
I'm trying to write a DBI2 compliant module for Microsoft Access
databases. Now I'm not quite sure how to interpret the DBI2
specification when it comes to the execution of multiple data
returning statements with the same cursor.
For example if c is my cursor and I do:
c.executemany("SELECT * FROM table WHERE column = '%s'", [["parm1"],
should the result be the union of all three statements or just the
result of the first or the last statement? Or should the user switch
from one resultset to the next with nextset?
And what if I execute another SELECT-statement before all results of
the previous execute or executemany have been fetched? Should the
cursor first return the rest of the previous statements results or
should the results of the last statement replace whatever there was
Maybe someone reading this group can clarify those points for me.
More information about the Python-list