Monday, April 28, 2014

scape percentage (%) character in sp_addmessage

Good night!


Thanks a lot for your help.


I'm running a language change like this:



SET LANGUAGE us_english;

If I use this language I obtain the error posted first.


If I use with Spanish i obtain another bug like this:



Msg 50000, Level 16, State 1, Procedure pa_1, Line 211
La cuota diligenciada con $100,000.00 y el porcentaje diligenciado con 100(null)eben ser mutuamente excluyentes, es decir, si uno de ellos es diferente de cero, el otro debe ser cero.

Please observe the word null in the message. The message must be:


"La cuota diligenciada con $100,000.00 y el porcentaje diligenciado con 100% d eben ser mutuamente excluyentes..."


Now I response to you.


If I run your first select I obtain a error message because the "message" column doesn't exist so I run a Select * FROM [SYS].[SYSMESSAGES] WHERE [MESSAGE_ID] =60001 and this is the result:



message_id language_id severity is_event_logged text
60001 1033 16 0 The quota filled with %s and the percentage filled with %s must be mutually exclusive, ie, if one of them is nonzero, the other must be zero.
60001 3082 16 0 La cuota diligenciado con %1! y el porcentaje diligenciado con %2! deben ser mutuamente excluyentes, es decir, si uno de ellos es diferente de cero, el otro debe ser cero.

If i run the second SELECT @@LANGUAGE In a new session (WITHOUT run a SET LANGUAGE) the result is EspaƱol

Again, thanks a lot for your valuable help.


No comments:

Post a Comment