aspose file tools*
The moose likes JDBC and the fly likes Displaying record not exists Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Displaying record not exists" Watch "Displaying record not exists" New topic
Author

Displaying record not exists

Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 726
Hello,

I am trying:
1) to print the cv_id that not exists in the database
2) to delete the cv_id records if exists in db

No. (2) is working but (1) not working




Thanks & best regards>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60041
    
  65

Please take the time to choose the correct forum for your posts. This forum is for questions on Servlets. For more information, please read this.

This post has been moved to a more appropriate forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29219
    
134

That's a lot of nested if statements - you might want to extract some of them into separate methods.

In any case, check your indentations. I think the last else is mismatched. It should go with the first if logically, but in the code it does not.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 726
Now I consized the code but even not succeeded to run this simple code:


Thanks & best regards
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29219
    
134




Fixed indentation. You are correct that the else isn't the write spot now. Are you saying you don't get "Hello not working" when no results are returned from the query?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying record not exists
 
Similar Threads
Search query is taking too long to search
Why my code is not working
How to get a blank ResultSet to do update?
Showing resultSet
Inserting arrays into database