We use in all procedures customized error codes to give feedback to the client what was wrong.
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
You can choose the langauge for error messages with the dblang utility or the "SALANG" environment variable. But this setting only applies to "integrated" error messages. For custom errors, created with "create message" or "sp__addmessage" ( i can't find a sp_setmessage procedure even in the newest help for SA12) there is no possibility afaik to store different messages for different languages in SA (as, according to the help file, is available in ASE). We used our own table and function and the connection property "language", which is set through the aforementioned steps.