SQLServer Portuguese Error Messages - (LocalDB) \ v11.0

7

I'm developing an application with Entity Framework 6 using the Code-First approach.

I want to configure SQLServer (LocalDB) \ v11.0 to display error messages in Portuguese without using SQL Server Management Studio .

From the research I did, one of the possibilities would be to use the Current Language attribute on ConnectionString .

That's what I tried but with no result.

<connectionStrings>
    <add name="AssociGestorDb" 
        connectionString="Server=(LocalDB)\v11.0;
                          Database=AssociGestorDb;
                          Integrated Security=True;
                          Current Language=Portuguese;
                          Connect Timeout=30"
        providerName="System.Data.SqlClient" />
</connectionStrings>

On the other hand if using SQLExpress already works.

<connectionStrings>
    <add name="AssociGestorDb"
         providerName="System.Data.SqlClient"
         connectionString="Server=.\SQLExpress;
                           Trusted_Connection=true;
                           Current Language=Portuguese;
                           Database=AssociGestorDb"/>
</connectionStrings>  

What is the correct way to get the error messages in Portuguese in (LocalDB) \ v11.0?

    
asked by anonymous 23.04.2014 / 15:24

1 answer

4

I do not know how to configure the server, but when I need to know the meaning of an error message, I execute the following select:

select * from master.dbo.sysmessages 
where msglangid = 1046
order by error

Where msglangid 1046 refers to the Portuguese language message, and error is the error code that the server returns.

    
23.04.2014 / 16:36