DBStorage.DeleteDataKey

Ee799133.c++_on(en-US,CS.10).gifEe799133.vb_off(en-US,CS.10).gif

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

Definition

Sub DeleteDataKey(vtReserved As Variant,vtKey As Variant)

Parameters

vtReserved

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

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

None.

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

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.

Example

' Order is a Commerce.OrderForm object; OrderFormStorage is 
' an initialized Commerce.DBStorage object

Order.shopper_id = "Shopper_tmp"
OrderFormStorage.DeleteDataKey(Null, "1234567890WSXCDERFVBGTRESWER")

See Also

DBStorage Object

DBStorage.InitStorage

DBStorage.DeleteData

DBStorage.InsertData


All rights reserved.