DataFunctions.GetLocaleInfo

Ee798612.c++_on(en-US,CS.10).gifEe798612.vb_off(en-US,CS.10).gif

Use this method to get information on the specified locale.

Definition

Function GetLocaleInfo(vtInfo As Long,vtLocale As Variant) As Variant

Parameters

vtInfo

A Long that indicates the type of locale information to return. This value must map to one of the LCTYPE constants. For information about these constants, see the Win32 SDK Help.

vtLocale

A Variant that identifies the locale for which to return information. If this Variant is empty (VT_EMPTY) or null (VT_NULL), the method returns information for the locale specified by the most recent call to put_Locale.

Return Values

If this method completes successfully, it returns a string Variant that contains the requested locale information; otherwise, NULL is returned.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

The Locale property stores a number value that indicates the default locale to be used by the DataFunctions methods to format date, time, money, and number information. For those DataFunctions methods take a locale value for a parameter, if that value is not supplied, the value of this property is used.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Example

Dim vtResult, lInfo
Set MSCSDataFunctions = Server.CreateObject("Commerce.DataFunctions")
' Set Locale to USA
myLocale = "1033"
MSCSDataFunctions.Locale = myLocale
vtResult = MSCSDataFunctions.GetLocaleInfo(lInfo, myLocale)

See Also

DataFunctions Object

DataFunctions.Locale


All rights reserved.