IMSCSDBStorage_3_0::get_Mapping, put_Mapping Property [C++]

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

[C++]

Get method:

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

Put method:

HRESULT IMSCSDBStorage_3_0::put_Mapping(IDispatch*Mapping);

[Visual Basic]

Property Mapping As Object

Parameters

  • Mapping[C++]
    [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.

[Visual Basic] None.

[C++]

Return Values

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

Error Values

[C++] 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.

[Visual Basic] This property 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

[C++]

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.

[Visual Basic]

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 use this object to set the Mapping property. 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.

See Also

[C++]DBStorage Object

[C++]IMSCSDBStorage_3_0::InitStorage

[Visual Basic]DBStorage Object

[Visual Basic]DBStorage.InitStorage

Copyright © 2005 Microsoft Corporation.
All rights reserved.