ADSSession class

GetJobForDescription method

   

The GetJobForDescription method returns the job with the specified description.

Syntax

 

C++

hr=session->GetJobForDescription(BSTR description,IADSJob **job)

VB

set job=session.GetJobForDescription(BSTR description)

Parameters and Return Value

 

description

The description of the job to retrieve.

job

The job with the specified description.

Error Codes

The following error codes are commonly encountered with this method. See the Error Codes topic for additional error-handling information.

 

ADS_E_NOT_FOUND

No job matches the specified description.

Remarks

The Description of each job is the unique name that is displayed to the user in the Schedule Administrator and other user interfaces. The GetJobForDescription method is useful for retrieving a job based on a user's selection from a list of job descriptions.

Because a user can change the description of the job, the description should not be used as a means of locating a specific job from session to session. Use the GetJobForTag method for this instead.