Meaningless Drivel is fun!*
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
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: 2234
    
    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: 37970
    
  22
Is public the name of the schema or the table? It is a poor name for either, by the way.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: In DB 1 row in resultset nothing
 
Similar Threads
Storing objects un an ArrayList
Resultset row count
problem in updating a row in JDBC
need java logic
Resultset getting closed. Resultset Already closed exception JZ0R0