Martin,
SQL Server has limited error handling capabilites. See @@ERROR in BOL. Although incoming SQL Server 2005 has TRY...CATCH structured error handling.
>
>Just wanted to know how I can trap errors in a stored procedure? Like if a value was entered more than once on a primary key field, how do I trap the error? To inform the application of the error I would just return an error number.
>
--sb--