aspose file tools
The moose likes JDBC and Relational Databases and the fly likes I want to not allow to insert more than 4 records Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "I want to not allow to insert more than 4 records" Watch "I want to not allow to insert more than 4 records" New topic
Author

I want to not allow to insert more than 4 records

Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 744
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

Joined: May 26, 2003
Posts: 31571
    
185

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.


[OCA 8 book] [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: 744
You are right. Thanks a lot. Appreciated
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: I want to not allow to insert more than 4 records