AddStepToJob Method (SQL-DMO)

The AddStepToJob method configures the referenced SQL Server Agent job by appending the job step defined by the JobStep object specified.

Applies To

Job Object

Syntax

object.AddStepToJob( JobStep )

Part Description
object Expression that evaluates to an object in the Applies To list
JobStep Expression that evaluates to a JobStep object

Remarks

SQL Server Agent automated task administration is configured by adding, removing, and controlling the execution logic of job steps within jobs.

When using SQL-DMO, use the AddStepToJob method, or the Add method of the JobSteps collection, to specify additional steps for an administrative task automated in a SQL Server Agent job.

Prototype (C/C++)

HRESULT AddStepToJob(LPSQLDMOJOBSTEP pJobStep);

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.