Hi Guys,
I am trying to make a webpage using asp.net and SQL server 2008.
Just a simple page through which data will be inserted to the database. But I noticed it is taking duplicate records as wel. So I used "Unique" constraint while the respective table and it is working fine.
But I wanted to show an error message which says "DATA already exists" after I am clicking the Insert button on the page.
Is it possible to check for duplicate entries and show the result while we are inserting data to a database?

Please help with a code snippet.

Thanks in advance.

Regards.

Great post and good post.

Thank you . But any help regarding how can I validate duplicate records while inserting data?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.