The Command property specifies the task of a job step.
object.Command [= value]
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
value | String |
The Command property specifies the execution string for SQL Server Agent. Failure or success of execution determines failure or success of the job step.
The text specified by the Command property is run by SQL Server Agent using the executable subsystem indicated by the JobStep object Subsystem property. Job step subsystem selection determines valid syntax for Command Property text.
String
Read/write
HRESULT GetCommand(SQLDMO_LPBSTR pRetVal);
HRESULT SetCommand(SQLDMO_LPCSTR NewValue);
Note SQL-DMO strings are always returned as OLE BSTR objects. A C/C++ application obtains a reference to the string. The application must release the reference by using SysFreeString.