Command Property

SQL-DMO

SQL-DMO

Command Property

The Command property specifies the task of a job step.

Applies To
JobStep Object
Syntax

object.Command [= value]

object

Expression that evaluates to an object in the Applies To list

value

String

Data Type

String

Modifiable

Read/write

Prototype (C/C++)

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 using SysFreeString.

Remarks

The Command property specifies the execution string for a 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 the 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.

See Also

SubSystem Property