AppConfig.GetRegionNamesListFromCountryCode
Use this method to retrieve an alphabetical list of region names associated with a specified country/region code.
Definition
Function GetRegionNamesListFromCountryCode(bstrCountryCode As String) As Object
Parameters
bstrCountryCode
A String that contains the code of the country/region for which a list of region names is being requested.
Return Values
If this method completes successfully, it returns a reference to a SimpleList object that contains an alphabetical list of region names associated with the specified country/region code.
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
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
' listRegions is a SimpleList object
Set listRegions = oAppConfig.GetRegionNamesListFromCountryCode("us")For Each sRegion In listRegions Response.Write sRegionNext' The above example will provide a list of USA state names
See Also
AppConfig.GetCountryCodeFromCountryName
AppConfig.GetRegionCodeFromCountryCodeAndRegionName