SQL Server - displaying PK errors
Posted on 2006-05-22
I am writing a ASP.NET page for the user to create some new records for a particular process that happens. If they attempt to create records for a record set that has already gone through the process the ASP page gives an ugly error message about not being able to see the error message due to security reasons.
I do the same thing on the local server and i get the following primary key violation error message...
"Violation of PRIMARY KEY constraint 'PK_Process'. Cannot insert duplicate key in object 'Process'. The statement has been terminated. "
This is correct, and what i intended the database to do but i would like a nicer looking way to display the error message for the end user.