Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: hi all

Re: hi all

From: Noons <wizofoz2k_at_yahoo.com.au>
Date: Thu, 04 Oct 2007 06:51:05 -0700
Message-ID: <1191505865.957343.110690@50g2000hsm.googlegroups.com>


On Oct 3, 11:26 pm, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net> wrote:

> <cacophony snipped>
> It appears from this:
>
> java.sql.SQLException: Exhausted Resultset
>
> you likely haven't gotten the first row and the pointer is sitting at
> the on-before-first element. A next() call should fix the problem.

David! You're still thinking procedurally! What he needs is an iterator class with polymorphic capability, so that he can very simply do: ResultSet
rs=stmt.next.row.in.Query.without.any.concern.for.reality(query);

of course, it is highly recommended that a specific framework be specially developed for for all queries of this type of SQL which

may return more than one row.  In fact, the ideal would be a specific:
ResultSet rs=stmt.row.number.
(var).in.Query.of.very.large.table(query);
then the iterator simply calls the appropriate value of var while it is
defined.

then again, the ideal would be to cache the whole lot: any of this database stuff only slows down the code!

</tongue-in-cheek> Received on Thu Oct 04 2007 - 08:51:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US