We use in all procedures customized error codes to give feedback to the client what was wrong.
// Initialized during Database generation
sp_addmessage 20102, 'Some Custom Error Message %1! only as an Example';
....
// In Procedures
raiserror 20102, 'with a Parameter';
We have different users working with the same instance of the Database in different countries in Europe.
My first thought was to have a translation table an query with the error code against this table. But what about the parameters used ?
What is best practice ? Is it possible to avoid a second call to the database ?
Kind Regards Thomas