This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes result set problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "result set problems" Watch "result set problems" New topic

result set problems

peter cooke
Ranch Hand

Joined: Mar 16, 2004
Posts: 317
Hello Hoping someone can shed some light.

I have the following prepared statment:

When I execute it returns 4 rows in the result set. Manually running the query in command line returns 3 rows. I have never experienced a situation where one query returned a different # of rows from the other.

Any explanation for this behavior or suggestions on how to determine cause.

[edited to add line breaks so screen doesn't scroll right]
[ July 20, 2006: Message edited by: Jeanne Boyarsky ]

CIAO Peter M. Cooke
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32636

I once saw that when I didn't close the ResultSet. Presumably due to a problem with the driver.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: result set problems
It's not a secret anymore!