ICommandPersist:: LoadCommand

Loads a persisted command definition.

HRESULT   LoadCommand(
   DBID *   pCommandID,
   DWORD   dwFlags);

Parameters

pCommandID

[in]
The DBID of the command to load.

dwFlags

[in]
Reserved for future use. Consumers should set this value to zero. Providers should ignore this argument.

Return Code

S_OK

The command was successfully loaded.

E_OUTOFMEMORY

There is not enough memory to successfully load the command.

DB_E_OBJECTOPEN

A rowset was open on the command.

DB_E_BADCOMMANDID

The command specified in *pCommandID does not exist.

E_FAIL

A provider-specific error occurred.

Comments

LoadCommand loads the persisted command definition into the current command object. Loading a persisted command definition does not change the command object's transaction scope and semantics, nor does it change the session scope. Set property values as well as specified parameter information are not affected by loading a persisted command definition. LoadCommand fails if the current command object has any outstanding rowsets (DB_E_OBJECTOPEN).