Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I want to not allow to insert more than 4 records

 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am inserting records with the following method but I want to not allow to insert more than 4 records. Any suggestion please?



Thanks & best regards>
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34672
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you want to happen if there are more than four? It seems like you could add a counter variable that you increment in the if statement and then take the appropriate action when it becomes five.
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right. Thanks a lot. Appreciated
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic