Previous in Contents Next in Contents

IDBStorage::put_Mapping

The put_Mapping method sets the mapping Dictionary for this DBStorage object instance. For more information about the mapping Dictionary, see the "Remarks" section below.

HRESULT put_Mapping(
IDispatch *pdispMapping
);

Parameters

pdispMapping
An IDispatch interface pointer on the mapping Dictionary.

Include File

<commerce.h>

Remarks

A mapping Dictionary makes it possible to map the column names in a database table to one or more names that you choose, usually for display to the site visitor. Suppose, for example, that your database table contains a column named "shopper_name", but that you want to display the contents of this column as the more human-readable "Shopper Name". Consequently, you initialize a "shopper_name" key in a Dictionary to "Shopper Name", and pass this Dictionary to put_Mapping. When you call a DBStorage data retrieval method, such as GetData, to read a row of data into a Dictionary, the Dictionary key for the "shopper_name" column reads "Shopper Name". This new mapping means that you do not have to translate the column name to a more human-readable name before displaying its values to the site visitor; You can simply display the keys and values as they appear in the Dictionary returned by GetData.

Return Values

This function always returns S_OK.

Related Topic

IDBStorage::get_Mapping


© 1997-2000 Microsoft Corporation. All rights reserved.