C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

duplicate records


Posted Date: 04 Jul 2008      Posted By: sudha      Member Level: Gold     Points: 1   Responses: 2



how to avoid duplicate records
if the username with the current date exist it will show error as 'already entry existed with this date'.

how to do





Responses

Author: balamurugan    04 Jul 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 3

if exist(select * from tablename where username ="value" and date = datevalue ) then
messegebox.show("already entry existed with this date")
end if



Author: Jaya Kumar    04 Jul 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

IF EXISTS ( SELECT * FROM Table WHERE User_Name = 'abc' AND Date='01/01/2008')
RAISERROR('already entry existed with this date',16,2)
RETURN



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Removing perticular line from text file(.txt)
Previous : How to create DataSet at runtime ?
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use