I had it and it drove me crazy.
What happens if the operation is not an INSERT statement, insertId is discarded since no row was inserted, but instead of just showing 0, it gives a cryptic DOM error.
You just need to ignore it and focus on the lines.
The big question is: why the hell is this first, why not just create sqlInsertResultSet and sqlRetrieveResultSet and stop interfering in our minds :(
Pedro
source share