Share via


DBStorage.Mapping Property (PIA)

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

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Orders
…
Public Property Mapping As Object

[C#]

using Microsoft.CommerceServer.Interop.Orders;
…
public object Mapping {get; set; }

Property Value

A Dictionary that is set for this DBStorage object instance.

Exceptions

This property may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

Remarks

[Visual Basic .NET] 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.

[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.

Requirements

Namespace: Microsoft.CommerceServer.Interop.Orders

Platforms: Windows 2000, Windows Server 2003

Assembly: commercelib (in commercelib.dll)

See Also

DBStorage Class

DBStorage.InitStorage

Copyright © 2005 Microsoft Corporation.
All rights reserved.