Sqlserver English Error Messages - (Localdb) v11.0

Asked

Viewed 334 times

7

I’m developing an app with Entity Framework 6 using the approach Code-First.

I want to configure Sqlserver (Localdb) v11.0 to display error messages in English without using SQL Server Management Studio.

For the research I did, one of the possibilities would be to use the attribute Current Language in the Connectionstring.

That’s what I tried but without 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 English in (Localdb) v11.0?

1 answer

4

I don’t know how to perform the server configuration, but when I need to know the meaning of an error message, I run the following select:

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

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.