Previous in Contents Next in Contents

IDBStorage::InitStorage

The InitStorage method initializes a DBStorage object. You must call this method immediately after creating an instance of the DBStorage object, and before calling any other DBStorage object methods.

HRESULT InitStorage(
VARIANT vtDataSourceDSN,// in
BSTR Table,// in
BSTR bstrKey,// in
VARIANT vtProgID,// in
VARIANT vtMarshal,// in
VARIANT vtChanged// in
);

Parameters

vtDataSourceDSN
A VARIANT in which the pdispVal member references a valid IDispatch pointer on a DataSource object, or in which the BSTR pbstrVal member references a data source name (DSN).
bstrTable
A BSTR that references the table on which this DBStorage object instance will operate.
bstrKey
A BSTR that identifies the key for the table identified by Table.
vtProgID
The program identifier (ProgID) for the object to be used to pass data to and from this DBStorage object instance. Accepted values include "Commerce.Dictionary" and "Commerce.OrderForm".
vtMarshal
The marshal column for the table identified in Table. See the "Remarks" section.
vtChanged
A BSTR VARIANT that specifies the date on which the change was made.

Include

<commerce.h>

Return Values

Value Description
S_OK The method succeeded.
E_FAIL The InitStorage method was invoked twice on the same object instance.
E_INVALIDARG The bstrTable or bstrKey parameters are NULL. Alternately, the vtDataSourceDSN parameter does not reference a valid Datasource object instance or data source name (DSN).


© 1997-2000 Microsoft Corporation. All rights reserved.