Persists the current command definition.
HRESULT SaveCommand(
DBID * pCommandID,
DWORD dwFlags);
Parameters
pCommandID
[in]
The DBID to assign to the persisted command. If this is a null pointer and the command already has a DBID, the provider saves the current version with the same DBID. If this is a null pointer and the command does not already have a DBID, the provider assigns an ID to the command. The ID must be unique.
dwFlags
[in]
Options for persisting command definition. Providers return DB_E_INVALIDARG if a flag the provider does not know is specified. You can use DBCOMMANDPERSISTFLAG_NOSAVE to associate or obtain a new DBID for the command without actually persisting the definition.
Return Code
S_OK
The command was successfully saved.
DB_E_BADCOMMANDID
The DBID specified in *pCommandID was invalid.
E_INVALIDARG
The argument dwFlags specified a value unknown by the provider.
DB_E_DUPLICATEID
The specified DBID already exists. If the provider supports the use of persisted commands as a source in a new command definition, DBIDs must be unique across persisted commands, procedures, tables, and views.
E_FAIL
A provider-specific error occurred.
Comments
SaveCommand saves the current command definition. It does not persist any open rowsets, current property values, or specified parameter information.