Click here to Skip to main content
15,898,134 members
Articles / Database Development / SQL Server

How to stop duplicated records

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
23 Nov 2012CPOL 2.3K  
I am making a event management system....I want only 3 events can be booked per day not more than 3I do not know how to do this any help will be appreciated

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
23 Nov 2012fjdiewornncalwe
Before you insert a new record, run a query against your table where you store the events and count how many already exist. If there are already 3, then simply don't allow a user to continue adding new records.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Pakistan Pakistan
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions