Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying record not exists

 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64713
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34195
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now I consized the code but even not succeeded to run this simple code:


Thanks & best regards
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34195
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic