DBStorage.GetData
Use this method to retrieve a row of data from the database, based on the specified key value. If the data is found, this method creates and returns an OrderForm or Dictionary object containing the requested data.
Definition
Function GetData(vtReserved As Variant,vtKey As Variant) As Variant
Parameters
vtReserved
A Variant reserved for future use. The GetData method ignores any value stored in this parameter.
vtKey
A Variant that contains the key value on which to base the search. The GetData method searches for this value in the table column specified as the table key in the initial call to the InitStorage method.
Return Values
If this method completes successfully, a Variant containing a Dictionary or OrderForm object that contains the retrieved row is returned.
Error Values
This method 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
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
Example
' Order is a Commerce.OrderForm object; OrderFormStorage is
' an initialized Commerce.DBStorage object; vtVar is a Variant
Order.order_id = "Order_tmp"
VtVar = OrderFormStorage.GetData(Null, Order.order_id)