On 22 May 2002 Christian Haul wrote: > > The loop test cannot be: > > > } while(_esql_query.getMoreResults()); > > because this would stop the loop whenever the next result is an update count > > (without processing this update count and any following results). Please > > read the javadoc carefully any try experimenting with a simple standalone > > test programme. > > Neil, please look at the actual code. EsqlQuery.getMoreResults() does a lot > more than Statement.getMoreResults(). OK. I didn't spot that your change depends on updates to other files too. Picky minor point: Although I don't like the semantics of JDBCs getMoreResults() I like even less having different semantics for the same method name in EsqlQuery.
> > Please also note from the JDK javadocs: "For maximum portability, a call's > > ResultSet objects and update counts should be processed prior to getting the > > values of output parameters." > > This was the wrong way around in esql 1.22. > > Again, please look at the code. EsqlQuery.getMoreResults() retrieves the > update count and keeps it for later reference. Further calls to EsqlQuery.getUpdateCount() > will return the buffered result. Thats nice, but not relevant to the Sun doco that I quoted. I'll rephrase it: fetching OUT parameters should be done after processing all returned results. >From esql.xsl 1.24: <xsl:if test="esql:call"> // call results <xsp:content> <xsl:apply-templates select="esql:call-results"/> </xsp:content> </xsl:if> <xsl:call-template name="do-results"/> My understanding is that fetching OUT parameters is done within esql:call-results and processing returned results is done by esql:do-results. If so it is done the wrong way around. > I settled for Torstens solution without @index. Both requirements (different / > same esql:results) are difficult to provide. Please suggest a syntax for that. Some possibilities are to reuse the last one or to add a 'default' attribute or some such. But I wouldn't bother unless there is some consensus that its a good idea. > So, could you please check with the current code whether it does what it should? I'm trying to get minimum modifications to cocoon-2.0.2 to do what I need. I can't just switch from a stable release to the latest CVS snapshot (boring I know). Do you think I should try the latest esql.xsl, EsqlQuery.java & EsqlHelper.java over cocoon-2.0.2 or do you know of other updates that these depend on (those are the only files I had to update for my patch). > > PRIVILEGED - PRIVATE AND CONFIDENTIAL > > This email and any files transmitted with it are intended solely for the use > > Does this indicated we would not be able to use your patch? Anybody may use it. I'll try to remove that from future postings. Thanks for your help and the good stuff in esql. Regards, Neil. --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>