I am looking for a best practice really...
I have a MS SQL table that contains a column that is unique, e.g. Name. In VB.NET what is the best practice to check that a new records Name value does not already exist in the database?
1) try to catch the error in the insert query and if so how? OR
2) create a separate query that first validates the Name text to see if it already exists in the database and if it does then warn the user?
At the moment I am doing point 2.