IMSCSDBStorage_3_0::DeleteData

Ee796678.c++_off(en-US,CS.10).gifEe796678.vb_on(en-US,CS.10).gif

Use this method to delete a row from the data source, based on the data stored in the specified Dictionary or OrderForm object.

Definition

HRESULT IMSCSDBStorage_3_0::DeleteData(VARIANTvtReserved,IDispatch*pdispData);

Parameters

vtReserved

[in] A VARIANT reserved for future use. This parameter is ignored by the DeleteData method.

pdispData

[in] A pointer to the data object to delete. This data object can be either an OrderForm or a Dictionary, but must correspond in type to the object type specified as the ProgID in the initial call to the InitStorage method.

Return Values

This method returns an HRESULT indicating whether it or not 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.

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 the DeleteData 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::DeleteDataKey

IMSCSDBStorage_3_0::InsertData


All rights reserved.