This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes In DB 1 row in resultset nothing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "In DB 1 row in resultset nothing" Watch "In DB 1 row in resultset nothing" New topic
Author

In DB 1 row in resultset nothing

Isaac Ferguson
Ranch Hand

Joined: Jun 22, 2012
Posts: 331
Hi

in my DB I have one row but when I execute it




thje resultset is empty
Aany idea, please?

Thanks
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

*public.person* ? *I am not good at DB even in basic level* .. but my guess is that what is the public?
Isaac Ferguson
Ranch Hand

Joined: Jun 22, 2012
Posts: 331
Yes it is very basic

It is the name if the DB scheme

Thats correct
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2229
    
    7

The public.person seems ok if the public is the schema and person is the table. Did you run the query in the database?

Also how do you if the result set is empty? Did you check res.next()?


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37900
    
  22
Is public the name of the schema or the table? It is a poor name for either, by the way.
 
jQuery in Action, 2nd edition
 
subject: In DB 1 row in resultset nothing
 
Similar Threads
problem in updating a row in JDBC
need java logic
Resultset getting closed. Resultset Already closed exception JZ0R0
Storing objects un an ArrayList
Resultset row count