I am working on some problems with website and database after moving server. The database was previously SQL Server Express 2005, but now runs on SQL Server Express 2012.
Problems relate to the RAISERROR team and the changes in 2012. I looked through the documentation for the new syntax, but I donβt know how I can transfer both the error number and the message to the website.
Some examples of RAISERROR commands in stored procedures and triggers:
RAISERROR 50000 'Member with same Email address already exists.'
RAISERROR 44447 'The record can''t be added or changed. Referential integrity rules require a related record in table ''tblBrand''.'
RAISERROR 44446 'The record can''t be added or changed. Referential integrity rules require a related record in table ''tblFragranceHouse''.'
I changed some to the new syntax, but not sure if I did it right or not. I understand that if I just pass the error text, it will skip the error number 50000. But I'm not sure what to do with the other error codes.
Any tips on how to translate these teams for 2012?
source
share