SQL Server Development Bookmark and Share   
 index > SQL Server Database Engine > RAISERROR not found in Spanish
 

RAISERROR not found in Spanish

Hi,
I have this code and it found correctly:

SET LANGUAGE 'English';

EXEC sp_dropmessage 20090928, 'Spanish'
EXEC sp_dropmessage 20090928
EXEC sp_addmessage 20090928,16,'Esto es solo una prueba %s %s'
EXEC sp_addmessage 20090928,16,'Just a test %s %s','spanish'


RAISERROR (20090928,16,1,'detail1','detail2')

Server Response:
Msg 20090928, Level 16, State 1, Line 9
Esto es solo una prueba detail1 detail2

Perfect!!!!
Now I need my server in spanish!

so I do that:

SET LANGUAGE 'Spanish';

EXEC sp_dropmessage 20090928
EXEC sp_dropmessage 20090928, 'english'
EXEC sp_addmessage 20090928,16,'Just a test %s %s', 'english'
EXEC sp_addmessage 20090928,16,'Esto es solo una prueba %s %s'

RAISERROR (20090928,16,1,'detail1','detail2')



Well. SQL response with an error like this:
"Especificación de formato no válida: 's %s'." -> like a Format not valid message...

In english "mode" server found perfectly...
Why changing default language RAISEERROR not found???


Note that setting the server in Italian, Franch or other it found perfectly...

Thk!
Marco CZ

Marcocz  Monday, September 28, 2009 3:27 PM
You should always add the us_english laguage first, and there use placeholders such as %s. But for the other languages, placeholder look different,%1!, %2! etc
Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi
  • Marked As Answer byMarcocz Tuesday, September 29, 2009 10:12 AM
  •  
TiborK  Monday, September 28, 2009 7:17 PM
You should always add the us_english laguage first, and there use placeholders such as %s. But for the other languages, placeholder look different,%1!, %2! etc
Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi
  • Marked As Answer byMarcocz Tuesday, September 29, 2009 10:12 AM
  •  
TiborK  Monday, September 28, 2009 7:17 PM
Thank you very much!
Works perfectly.

Marco CZ
  • Marked As Answer byMarcocz Tuesday, September 29, 2009 10:12 AM
  • Unmarked As Answer byMarcocz Tuesday, September 29, 2009 10:12 AM
  •  
Marcocz  Monday, September 28, 2009 9:34 PM

You can use google to search for other answers

Custom Search

More Threads

• After each backup
• A Tool that will detect all SQL instances / Installation
• Error " Invalid object name 'information_schema.table_privileges "---Urgent
• SQL-Server 2005 SQL Server (SQLEXPRESS) service does not start automatic
• Different plans with literal string vs. param
• Database Restore
• unable to start server
• How to describe the new types: Date and Time with ODBC API?
• Cannot run distributed query!
• The SQL Server (MSSQLSERVER) service terminated with service-specific error 1814 (0x716)?