DBStorage.DeleteDataKey Method

The DeleteDataKey method deletes the data corresponding to the specified key.

Syntax

DBStorage.DeleteDataKey(Null, Value)

Parameters

Null
This parameter is required for compatibility with Commerce Server 2.0, but is not used.
Value
The key value for the row to be deleted.

Remarks

The DeleteDataKey method differs from the DeleteData method in that the former requires only the value stored in the underlying table’s key column. This is the column specified as the key to the underlying table through a previous call to InitStorage.

Thus, if you specify an IDENTITY field in an SQL table as the key into the data source, you can delete all the columns for a specified row by simply providing the appropriate counter value. Alternatively, you can initialize a Dictionary object to the values stored in one or more columns, and pass this initialized object to DeleteData.

Related Topics


© 1997-1998 Microsoft Corporation. All rights reserved.