QueryResult is backed by a sql.ResultSet. It iterates the ResultSet only if
next() is called.
So, displaying the number of result is not possible.
You may use another query that returns only the number. I think the
performance will not be great but should be acceptable.


Thomas

-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, August 28, 2001 9:18 PM
>To: [EMAIL PROTECTED]
>Subject: [castor-dev] resultSet into an array
>
>
>What is the 'castor way' to deal with a select call that returns more than
>one row?
>
>One thought is to take result.hasMore() and the answers from result.next()
>and add them to a Vector as they come out of result.next().
>
>I have a db table of items with owners. When an owner requests a list of
>items belonging to that owner, I want to put a count on the screen before
>the list of items. Give the QueryResults object only iterates through the
>answers once, I thought I better save them somewhere else.
>
>
>Thank You
>Don Park
>--
>** BeeHive Games, Multiplayer Bluetooth PDA Gaming
>** http://beehivegames.com
>** irc.openprojects.net #palmchat,#orlug,#java
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>        unsubscribe castor-dev
>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to