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

Home -> Community -> Usenet -> c.d.o.tools -> Re: To know the number of results returned just after query ??

Re: To know the number of results returned just after query ??

From: TurkBear <noone_at_nowhere.com>
Date: Thu, 02 Aug 2001 09:34:06 -0500
Message-ID: <8uoimtca395sf8trk760v0pl9cdpp3j2t2@4ax.com>

Cross-posting is not wise..

Try a second sql - use select count(*) from whatever where ( use same criteria as the first sql) But, I cannot imagine that there is not an equivalent to :



int cnt
rs.MoveFirst
Do while NOT rs.EOF

       int cnt = cnt + 1
 rs.MoveNext
Loop


Isma <Isma_at_iballo.com> wrote:

>Hi,
>
>I use a JDBC driver. I want to know whether exists a command to know the
>results number just after the query.(i.e. lines)
>
>[I know it exists getColumnCount() to know the number of columns return
>..
>int numcols = rsmd.getColumnCount();
>]
>
>stmt.execute(sql)
>ResultSet rs = stmt.getResultSet();
>ResultSetMetaData rsmd = rs.getMetaData();
>
>
>What about getfetchSize() ??? it always return 10 whatever returned
>results.
>

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 80,000 Newsgroups - 16 Different Servers! =----- Received on Thu Aug 02 2001 - 09:34:06 CDT

Original text of this message

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