db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: [jira] Commented: (DERBY-614) Execution failed because of a Distributed Protocol Error
Date Sat, 26 Nov 2005 21:23:15 GMT
Bryan Pendleton (JIRA) wrote:
[snip a bunch of stuff that sounds right]

>I'm still not really sure I understand this business about a statement having multiple
current result sets
>
A statement may have multiple result sets but only one of them is current.

A stored procedure can return multiple result sets which can all be 
retrieved with the Statement.getMoreResults()
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Statement.html#getMoreResults(int)
in JDBC
If KEEP_CURRENT_REULT is specified all these will all stay open.
You can see tests for this in procedure.java.

Network Server gets no notice of the getMoreResults call so network
server retrieves all the result sets up front using
KEEP_CURRENT_RESULT and puts them into this Hashtable in  DRDAStatement.
private Hashtable resultSetTable;     // Hashtable with
resultsets           

Then as CNTQRY requests come in for the individual result sets, the
currentDrdaResultSet is set to the appropriate result set.

>Lastly, I'm still not sure I understand how LMTBLKPRC is supposed to interact with callable
procedure statements, 
>
I think it is not a lot different than regular result sets except that
you can have more than one result set as described above.

>nor do I understand what  would cause the qryrtndta field to be set to FALSE.
>
 I don't know off how it would be transmitted as false via JDBC, but
worth looking at the client code to verify.





Mime
View raw message