This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30076
    
149

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
 
Similar Threads
Oracle Query is not running
problem while inserting the record in db using mySQL
Using Select query inside insert query
Strings
oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:306)