executeQuery() |
Syntax executeQuery (dsName [, dsName..] [,callbackFunction] )
Parameter(s) •dsName [String] (you may provide as many dsNames as you want) •callbackFunction [Function, Optional: null]
Description executeQuery() retrieves the data of a Data Source taking the search values into account. One or more Data Sources can be used as parameters.
The executeQuery function is a getRecordCount and getDataSet action in one page Engine Request. getRecordCount executes a SQL "SELECT COUNT(*)" on the Rules Engine to retrieve the number of records that can be queried by getDataSet.
To query two or more data sources in one page engine request provide a list of data sources names separated by ',' e.g.:
executeQuery("DEPT", "EMP", "PERSONS")
Which is the same as: uwa.groupRequests(function(){ executeQuery("DEPT") executeQuery("EMP") executeQuery("PERSONS") });
The callback function is for AJAX execution mode: for an example see executeSQLStatement().
Related functions: getRecordCount(), getDataSet(), uwa.groupRequests(), executeSQLStatement() |