The ValidateQuery Windows Management Instrumentation (WMI) class method, in Configuration Manager, verifies that a report query is a valid SQL statement and performs the same level of validation that occurs when the report is saved.

The following syntax is simplified from Managed Object Format (MOF) code and defines the method.

Boolean ValidateQuery(
	 String SQLQuery,
	 String Parameters[],
	 String SQLErrorMessage
);

Parameters

SQLQuery

Data type: StringQualifiers: [in]Query statement to validate.
Parameters

Data type: String ArrayQualifiers: [in]Query parameters.
SQLErrorMessage

Data type: StringQualifiers: [out]SQL error message.

Return Values

A Boolean data type that is true if the query is valid.

Remarks

This method validates the SQL query that produces the result set of the SMS_Report Server WMI Class object. Your application calls this method before running the query.

Requirements

Runtime Requirements

Development Requirements

See Also