I have an application that updates an SQL Server Express database with values from a web form. This is done in the code behind VB in the button_click event. How do I check for an existing record with a value the same as the one trying to be created. Currectly, if someone trys to create a new record with the same name as a record that already exists the user gets a funky error message and bombed out of the web page. I just want to warn them that the records already exists and send them back to the web form to try again.
I need a good code example of how to do this.