AppConfig.GetRegionNameFromCountryCodeAndRegionCode

Ee785087.c++_on(en-US,CS.10).gifEe785087.vb_off(en-US,CS.10).gif

Use this method to get the name of the region associated with the specified country code and region code.

Definition

Function GetRegionNameFromCountryCodeAndRegionCode(bstrCountryCode As String,bstrRegionCode As String) As String

Parameters

bstrCountryCode

A String that contains the code of the country/region for which the region name is being requested.

bstrRegionCode

A String that contains the code of the region within the specified country/region for which the region name is being requested.

Return Values

If this method completes successfully, it returns a String that contains the region name. If the region name is not found, the String will contain the region code specified in the bstrRegionCode parameter.

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

If the region name is not found, this method returns the region code specified in the bstrRegionCode parameter.

Country codes, country names, region codes, and region names may be set in Commerce Server Business Desk.

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

Example

' oAppCfg is a Commerce.AppConfig object, sResult is a String
sResult = oAppCfg.GetRegionNameFromCountryCodeAndRegionCode("us", "UT")

See Also

AppConfig Object

AppConfig.GetCountryCodeFromCountryName

AppConfig.GetCountryNamesList

AppConfig.GetRegionCodeFromCountryCodeAndRegionName

AppConfig.GetRegionNamesListFromCountryCode

Table of Country/Region Names and Codes


All rights reserved.