IMSCSDBStorage_3_0::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
HRESULT IMSCSDBStorage_3_0::GetData(VARIANTvtReserved,VARIANTvtKey,VARIANT*pvtRet);
Parameters
vtReserved
[in] A VARIANT reserved for future use. The GetData method ignores any value stored in this parameter.
vtKey
[in] 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.
pvtRet
[out, retval] A pointer to a VARIANT used to return a Dictionary or OrderForm object used to return the retrieved row.
Return Values
This method returns an HRESULT indicating whether or not it completed successfully. See the Error Values section for more details.
Error Values
This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT 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, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.
Remarks
The pvtRet parameter points to valid data only if the method completes successfully.
For performance reasons, the GetData method is preferred over the LookupData method when the column being searched is the key.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
See Also
IMSCSDBStorage_3_0::InitStorage