Freigeben über


ICommandPersist::GetCurrentCommand

Returns the DBID of the current command.

Syntax

HRESULT GetCurrentCommand(
   DBID **ppCommandID);

Parameters

  • ppCommandID
    [out] A pointer to memory in which to return the pointer to the DBID of the current command.

Return Code

  • S_OK
    The DBID of the command was successfully returned.

  • E_OUTOFMEMORY
    There is not enough memory to successfully return the command's DBID.

  • DB_E_COMMANDNOTPERSISTED
    The current command does not yet have a DBID.

  • E_FAIL
    A provider-specific error occurred.

  • E_INVALIDARG
    ppCommandID was a null pointer.

Comments

When two command objects have loaded a persisted command, and one command object deletes the persisted command, the provider may return either S_OK or DB_E_COMMANDNOTPERSISTED when GetCurrentCommand is called. This return value will inform the provider that the persisted command no longer exists and GetCurrentCommand cannot return a value.