Closed GoogleCodeExporter closed 9 years ago
I think what is happening is that 3 SQL statements are being executed, so you
should get 3 "results". The first one isn't a select statement, so it returns
the error you see.
The most obvious, portable solution is to use 3 calls to execute(), and it
would also be my recommendation long term.
However, for cases where you really want this to work, you probably need to
call cursor.next() to move from one result set to the next. I'm not sure if
you need to call it once or twice -- I know you'll get results for the INSERT
statement. In particular, you should get the number of rows inserted in
cursor.rowcount.
You can also put SET NOCOUNT ON at the top to disable the generation of results
for non-query operations.
I'm going to close this because I'm pretty confident that is the issue. Please
re-open if next() does not fix it. Good luck.
Original comment by mkleehammer
on 28 Mar 2013 at 11:58
Original issue reported on code.google.com by
dmlvia...@gmail.com
on 19 Dec 2012 at 11:15