aspose file tools
The moose likes JDBC and the fly likes Displaying record not exists Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply 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: 672
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: 56152
    
  13

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.

[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26144
    
  66

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: 672
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: 26144
    
  66




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
Why my code is not working
Search query is taking too long to search
Showing resultSet
How to get a blank ResultSet to do update?
Inserting arrays into database