File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Showing resultSet 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 "Showing resultSet" Watch "Showing resultSet" New topic
Author

Showing resultSet

Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
Hello,

I am trying to print all specialty of specific category that is selected by cv holder. sId will mark checkbox checked if this already exist in db against this cv but the output is wrong as its display many duplicate records. Please help me



Thanks & best regards
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

What happens if you run these queries in your sql client software?
Do you get the results that yi$ou want there?


OCUP UML fundamental and ITIL foundation
youtube channel
Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

I don't see duplicates.
Kuldip Shetty
Ranch Hand

Joined: Jan 07, 2010
Posts: 39

Logic in Inner while loop is wrong. See my comments below in else block

Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
What should I do? I mean how can I correct it?

Thanks for your reply
Kuldip Shetty
Ranch Hand

Joined: Jan 07, 2010
Posts: 39

Test the below code and verify if it works as you expected. Hope the below code helps

Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
Thanks for your favorable reply and giving me your precious time.

I just copy pasted the following code after ps1.close(); and its work fine



I am thankful again from the bottom of my heart

Best regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Showing resultSet
 
Similar Threads
NumberFormatException: For input string: "null"
Displaying one to many records from DB
Displaying record not exists
Null Values
Want to convert my code in method