Sys.Data.DataService.query Method
Reads data from a data service.
Syntax
query: function(query, succeededCallback, failedCallback, userContext)
Usage
var a = exampleDataService.query(query, succeededCallback, failedCallback, userContext);
|
Parameter
|
Definition
|
|
query
|
(Optional) The path that defines the data to be returned by the query operation.
|
|
succeededCallback
|
(Optional) The function to execute when the insert operation succeeds.
|
|
failedCallback
|
(Optional) The function to execute when the insert operation fails.
|
|
userContext
|
(Optional) The state object for this operation.
|
Return Value
The Sys.Net.WebRequest object that performed the query operation.
Remarks
Use the query method to retrieve data from a data service. If you do not provide a value for the query parameter, the top-level collection is retrieved. The query method immediately executes a single query operation.
The signatures for the callback functions should be similar to the following code:
function callbackSucceeded(result, context, operation)
function callbackFailed(error, context, operation)
The functions you assign to the callback functions must accept three parameters. The first parameter contains the result (or error) returned by the data service. The second parameter contains the state object for the data operation. The third parameter contains a description of the operation that was performed. For query operations, the third parameter contains the string that defined the query.
This topic is ASP.NET Extensions documentation and is unsupported by Microsoft. Blank topics are included as placeholders and existing content is subject to change in future releases.