G
Guest
H
Does anyone know how to pass back the specific database error number from a SQL Server stored procedure, or else how the exception can beused to get this - I want to detect error 547 (foreign key violation) and display a more user friendly error message to the user but when the codes goes into the catch, all I can get from the exception is the full verbose error message ("DELETE statement conflicted with COLUMN REFERENCE constraint 'FK_tblJob_tblClient'. The conflict occurred in database 'NIIR', table 'tblJob', column 'ClientID'
The statement has been terminated."
Many thank
Siobhan
Does anyone know how to pass back the specific database error number from a SQL Server stored procedure, or else how the exception can beused to get this - I want to detect error 547 (foreign key violation) and display a more user friendly error message to the user but when the codes goes into the catch, all I can get from the exception is the full verbose error message ("DELETE statement conflicted with COLUMN REFERENCE constraint 'FK_tblJob_tblClient'. The conflict occurred in database 'NIIR', table 'tblJob', column 'ClientID'
The statement has been terminated."
Many thank
Siobhan