DBStorage Class (PIA)

Use this method to map Dictionary and SimpleList objects to and from the database, primarily for the storage of receipt and order information. The DBStorage object is created as needed on each page.

Methods

Method Description
CommitData Updates one or more records in the database storage.
DeleteData Deletes a row from the database storage, based on the data stored in a Dictionary or OrderForm object.
DeleteDataKey Deletes a row of data from the database storage, based on the specified key.
GetData Retrieves a row of data from the database storage, based on a specified key value.
InitStorage Initializes the object. This method must be called prior to calling any other DBStorage method.
InsertData Inserts the specified data into the database storage.
LookupData Retrieves a single row from the database storage, based on the specified column names and values.
LookupMultipleData Retrieves multiple results from the database storage.
ProcessData Unpacks the data stored in the MarshalColumn column for a given row, and returns the resulting row in a Dictionary object.

Properties

Property Type Description
Mapping Object Maps a database column to an entry in the OrderForm or Dictionary object that DBStorage uses to insert and retrieve data.

This property is read/write.

Remarks

The DBStorage object serves as an interface between the site database and Dictionary and OrderForm objects. A DBStorage object contains methods for transferring data between the database and the data object.

Using New to instantiate a DBStorage object will return an uninitialized instance of the DBStorage object. Use the InitStorage method to initialize the returned object instance. Attempting to call any other DBStorage method prior to calling the InitStorage method results in an error.

When the DBStorage object retrieves data from the database, it creates the appropriate type of data object (an OrderForm or Dictionary object), stores the requested data there, and then returns the data object. When the DBStorage object is used to save data in the database, you pass it to the OrderForm or Dictionary object containing the data, and the DBStorage method copies the data from the data object into the database.

Requirements

Namespace: Microsoft.CommerceServer.Interop.Orders

Platforms: Windows 2000, Windows Server 2003

Assembly: commercelib (in commercelib.dll)

See Also

General Purpose Objects

Copyright © 2005 Microsoft Corporation.
All rights reserved.