Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SqlParameter.LocaleId Property

Gets or sets the locale identifier that determines conventions and language for a particular region.

Namespace:  System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

[<BrowsableAttribute(false)>]
member LocaleId : int with get, set

Property Value

Type: System.Int32
Returns the locale identifier associated with the parameter.

The locale identifies conventions and language for a particular geographical region. The codepage used to encode a specific string (the character set) is based on the locale used by that string or the environment that produced it. This property sets (for input parameters) or gets (for output parameters) the locale to be attached to a string when exchanging data with the server. This property is typically used together with the CompareInfo property.

static void CreateSqlParameterLocaleId(){
   SqlParameter parameter = new SqlParameter("pName", SqlDbType.VarChar);
   parameter.LocaleId = 1033;   // English - United States
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft