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



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

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

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

Return Values

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


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.


Runtime Requirements

Development Requirements

See Also