IMSCSDBStorage_3_0::get_Mapping, put_Mapping

Ee784297.c++_off(en-US,CS.10).gifEe784297.vb_on(en-US,CS.10).gif

The Mapping property maps a database column to an entry in the OrderForm or Dictionary object that the DBStorage object uses to insert and retrieve data.

Definition

Get method:

HRESULT IMSCSDBStorage_3_0::get_Mapping(IDispatch**Mapping);

Put method:

HRESULT IMSCSDBStorage_3_0::put_Mapping(IDispatch*Mapping);

Parameters

Mapping

[in] When putting the property, an IDispatch interface that contains the mapping Dictionary that is set for this DBStorage object instance.
[out, retval] When getting the property, an IDispatch interface used to return the mapping Dictionary for this DBStorage object instance.

Return Values

These methods return an HRESULT indicating whether they completed successfully. See the Error Values section for more details.

Error Values

These methods return S_OK (0x00000000) to indicate success and standard COM HRESULT 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, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

Remarks

A mapping Dictionary object 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 user. 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 object to "Shopper Name", and pass this Dictionary object to the put_Mapping method. When you call a DBStorage object data retrieval method, such as GetData, to read a row of data into a Dictionary object, 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 user. You can simply display the keys and values as they appear in the Dictionary object returned by the GetData method.

The Mapping parameter contains valid data only if the property is accessed successfully.

See Also

DBStorage Object

IMSCSDBStorage_3_0::InitStorage


All rights reserved.