ValidateQuery Method in Class SMS_Report
Applies To: System Center 2012 Configuration Manager, System Center 2012 Configuration Manager SP1, System Center 2012 R2 Configuration Manager
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.
Syntax
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
For more information, see Configuration Manager Server Runtime Requirements.
Development Requirements
For more information, see Configuration Manager Server Development Requirements.