_OrderGroup::SaveAsBasket
Use this method to save the OrderGroup object to the database with a basket status.
Definition
HRESULT _OrderGroup::SaveAsBasket(VARIANT*pvtRetVal);
Parameters
pvtRetVal
[out, retval] A pointer to a VARIANT used to return the OrderGroupID.
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 pvtRetVal parameter points to valid data only if the method completed successfully.
This method sets the OrderGroup status to "basket", and sets the OrderGroupID equal to the user ID.
If the OrderGroup object was not loaded from a basket, this method deletes any existing on-disk basket before inserting into the data storage.
If the OrderGroup object was loaded from a basket, this method performs an update or insert depending on whether the OrderGroup was found on-disk on the load call. If you load a template or order and call the SaveAsBasket method, the template or order which was originally loaded remains unchanged on disk.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.