This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
The Category property represents the name of a category for SQL Server Agent alerts, jobs, and operators.
HRESULT GetCategory(SQLDMO_LPBSTR pRetVal); HRESULT SetCategory(SQLDMO_LPCSTR NewVal);
SQL Distributed Management Objects (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.
Microsoft SQL Server alert, job, and operator categories group SQL Server Agent objects. The Category property of SQL-DMO Alert, Job, and Operator objects references the applicable SQL Server Agent category.
Setting the Category property for the JobFilter object restricts listed SQL Server Agent jobs to those having the category when using the EnumJobs method of the JobServer object.