File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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
JavaRanch » Java Forums » Databases » JDBC
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: 732
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: 30749
    
156

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.


[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: 732
You are right. Thanks a lot. Appreciated
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I want to not allow to insert more than 4 records