can I tell resultset size?

This is a discussion on can I tell resultset size? within the JDBC JAVA forums in Framework and Interface Programming category; Hi. I'm using java 1.4.2 JVM talking via thin client to oracle 10.2.0.2 (I think this db flavor is irrelevant though). I have a statement that is normal (forward etc from generic 'java.sql.Connection.createStatement()' invocation). I'm sure there should be results, but the invocation of: "while (theResults.next()) " is not returning any rows. I'm not sure how to troubleshoot this deeper, i.e. why I'm not getting any rows back. Can someone offer a pointer, advice etc? thanks Jeff...

Go Back   Application Development Forum > Framework and Interface Programming > JDBC JAVA

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 09-05-2008, 11:13 AM
kishjeff
Guest
 
Default can I tell resultset size?

Hi.

I'm using java 1.4.2 JVM talking via thin client to oracle 10.2.0.2 (I
think this db flavor is irrelevant though).
I have a statement that is normal (forward etc from generic
'java.sql.Connection.createStatement()' invocation).
I'm sure there should be results, but the invocation of:
"while (theResults.next()) " is not returning any rows.

I'm not sure how to troubleshoot this deeper, i.e. why I'm not getting
any rows back.

Can someone offer a pointer, advice etc?
thanks
Jeff
Reply With Quote
  #2  
Old 09-05-2008, 03:31 PM
David Harper
Guest
 
Default Re: can I tell resultset size?

kishjeff wrote:
> Hi.
>
> I'm using java 1.4.2 JVM talking via thin client to oracle 10.2.0.2 (I
> think this db flavor is irrelevant though).
> I have a statement that is normal (forward etc from generic
> 'java.sql.Connection.createStatement()' invocation).
> I'm sure there should be results, but the invocation of:
> "while (theResults.next()) " is not returning any rows.
>
> I'm not sure how to troubleshoot this deeper, i.e. why I'm not getting
> any rows back.
>
> Can someone offer a pointer, advice etc?


Have you tried running the query by hand using the command-line client
SQL*Plus?

Or running a "select count(*) from ..." query using the same table(s)
and "where" clause, to count the number of rows which meet the conditions?

Those are the first two things that I try when I'm faced with a
mysteriously-empty result set.

David Harper
Cambridge, England
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 05:56 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.