OLE DB Programmer's Reference |
Persists the current command definition.
HRESULT SaveCommand( DBID *pCommandID, DWORD dwFlags);
Parameters
DBCOMMANDPERSISTFLAG_PERSISTVIEW
The command is to be persisted as a view. Views are row-returning objects that do not contain parameters or return values and can generally be used anywhere a base table is used. Views can be enumerated through the DBSCHEMA_VIEWS schema rowset.
DBCOMMANDPERSISTFLAG_PERSISTPROCEDURE
The command is to be persisted as a procedure. Procedures may or may not return rows and may or may not contain parameters or return values. Procedures can be enumerated through the DBSCHEMA_PROCEDURES schema rowset.
DBCOMMANDPERSISTFLAG_PERSISTVIEW and DBCOMMANDPERSISTFLAG_PERSISTPROCEDURE are mutually exclusive. If neither is specified, the provider persists the command as a default type.
Return Code
In dwFlags, both DBCOMMANDPERSISTFLAG_PERSISTVIEW and DBCOMMANDPERSISTFLAG_PERSISTPROCEDURE were specified.
DBCOMMANDPERSISTFLAG_PERSISTVIEW was specified, and the command could not be persisted as a view.
DBCOMMANDPERSISTFLAG_PERSISTPROCEDURE was specified, and the command could not be persisted as a procedure.
Comments
ICommandPersist::SaveCommand saves the current command definition. It does not persist any open rowsets, current property values, or specified parameter information.
1998-2001 Microsoft Corporation. All rights reserved.