The DBStorage.Mapping property maps a database column to an entry in the OrderForm or Dictionary object that DBStorage uses to insert and retrieve data.
receiptStorage.Mapping.Value(DataObjectProperty) = "DatabaseTableColumn"
The following example, from Volcano Coffee’s Include\Util.asp file, creates a storage object for receipts. The property of the order form called _total_total
is mapped to a database column called total
.
Set receiptStorage = Server.CreateObject("Commerce.DBStorage")
Call receiptStorage.InitStorage(MSCSSite.DefaultConnectionString, "vc30_receipt", "order_id", "Commerce.OrderForm" , "marshalled_receipt", "date_entered")
receiptStorage.Mapping.Value("_total_total") = "total"