IMSCSDBStorage_3_0::DeleteDataKey

Ee784218.c++_off(en-US,CS.10).gifEe784218.vb_on(en-US,CS.10).gif

Use this method to delete a row of data, based on the specified key value.

Definition

HRESULT IMSCSDBStorage_3_0::DeleteDataKey(VARIANTvtReserved,VARIANTvtKey);

Parameters

vtReserved

[in] This parameter is reserved for future use and is ignored by the current implementation of the DeleteDataKey method. This parameter is required for compatibility with Site Server 3.0 Commerce Edition, but is not used.

vtKey

[in] A VARIANT that contains the key value for the row to delete. This key corresponds to the column designated as the table key in the initial call to the InitStorage method. Thus, if the call to the InitStorage method specifies column "some_column" as the table key, then the DeleteDataKey method searches "some_column" for the value stored in the vtKey parameter, and deletes the corresponding row of data.

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 DeleteDataKey method differs from the DeleteData method in that the DeleteDataKey requires only the value stored in the key column of the underlying table. This is the column specified as the key to the underlying table through a previous call to the InitStorage method.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

See Also

DBStorage Object

IMSCSDBStorage_3_0::InitStorage

IMSCSDBStorage_3_0::DeleteData

IMSCSDBStorage_3_0::InsertData


All rights reserved.