PDA

View Full Version : Problem with Multiple ResultSets



PVG
04-03-2007, 12:49 PM
Hi,

I'm executing a storedprocedure which returns a multiple result set.

In the AdoResultProcessorsQueryCommandCallback class there was a problem in the DoInCommand method.

In the while loop, the datareader was each time created again by calling command.executeReader.

This was ok for the first resultset, but for the second result set I got the message that there was allready a reader associated with the command.

So I added a if null test arround this code. An other possibility was to move the initialization of the reader outside the loop. This is maybe an even more elegant solution.

KR

Patrick

Mark Pollack
04-03-2007, 09:05 PM
Hi Patrick,

Thanks for reporting this. I've fixed this bug by moving the creation of the reader outside the loop. I just triggered a new nightly build (http://www.springframework.net/downloads/nightly/). Pick up one dated later than 20070401-2216, it should be labelled something like 20070403-1616..

Cheers,
Mark