AppConfig Object

Ee785499.c++_off(en-US,CS.10).gifEe785499.vb_on(en-US,CS.10).gif

Use this object to retrieve site configuration settings from the site configuration store. Also, use this object to retrieve the names and codes of various countries and regions from the site configuration store.

ProgID:   Commerce.AppConfig (Externally creatable)
COM Class Name:   AppCfg
COM Interface Name:   IAppCfg
Interface ID Constant:   IID_IAppCfg
Header File:   mspu_guids.h
Type Library Name:   Microsoft Commerce 2000 App Helper Type Library
DLL Name:   AppHelper.dll
Threading Model:   Both

In C++, use the IAppCfg interface to access the methods of the AppConfig object.

Because this object is primarily intended for use within ASP script, access from C++ will not be common.

The methods of the AppConfig object are shown in the following table.

Method Description
DecodeStatusCode Decodes the specified status code.
GetCountryCodeFromCountryName Returns the country/region code for the specified country/region name.
GetCountryNameFromCountryCode Returns the country/region name for the specified country/region code.
GetCountryNamesList Returns an alphabetical list of country/region names.
GetOptionsDictionary Returns a Dictionary object that maps site configuration keys to site configuration values.
GetRegionCodeFromCountryCodeAndRegionName Returns the region code for the specified country/region code and region name.
GetRegionNameFromCountryCodeAndRegionCode Returns the region name for the specified country/region code and region code.
GetRegionNamesListFromCountryCode Returns an alphabetical list of region names for the specified country/region code.
Initialize Initializes the AppConfig object.
RefreshCache Refreshes the AppConfig object cache.

Remarks

This object is usually created once and initialized in the Global.asa file, for performance reasons. An instance of it is stored in the Application object and used on ASP pages as necessary.

The following example illustrates these steps:

Dim oAppConfig
Set oAppConfig = Server.CreateObject("Commerce.AppConfig")
Set Application("MSCSAppCfg") = oAppConfig

Country/region codes may or may not be the same as ISO Country/Region codes, depending on what values have been added in the Business Desk.

See Also

Configuration Objects

Table of Country/Region Names and Codes


All rights reserved.