Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Represents the result of one operation from a sequence of actions executed against the data service.
Namespace: Sys.Data.
Inherits: None.
Sys.Data.AdoNetActionResult = function(result, httpHeaders, actionContext, operation)
Public Constructors
Name |
Description |
|---|---|
Creates a new instance of the AdoNetActionResult class. |
Members
Member |
Description |
|---|---|
Gets the state object that was passed for the operation. |
|
Gets a dictionary of HTTP headers associated with the entry for this action in a batch response. |
|
Gets a description of the operation that was performed. |
|
Gets the result of the operation. |
Remarks
When you execute a sequence of data operations in a single request, one AdoNetActionResult object is returned for each data operation. The AdoNetActionRequest class lets you examine the results of a single data operation that was performed as part of the series of actions.
You create and execute a sequence of data operations by calling the Sys.Data.AdoNetServiceProxy.createActionSequence and Sys.Data.AdoNetActionSequence.execute methods. When calling the execute method, you provide two callback methods for succeeded and failed scenarios. For the succeeded operations, the callback method receives an array of AdoNetActionResult objects. You can retrieve those AdoNetActionResult objects in the callback method and take any required actions based on their values. For the failed operations, an error with the WebServiceError type will be passed into the callback function.
The following table lists the data operation scenarios and the contents of the result and error properties for each scenario.
Scenario |
Contents of result property |
Contents of error property |
|---|---|---|
Exception thrown by data service |
null |
An instance of the Sys.Data.AdoNetServiceError class. |
Insert operation |
An object that represents the new data. |
Null |
Remove or update operation |
null |
Null |
The operation property contains a description of the type of operation that was performed. Depending on the operation, the string value in the property will be "update", "insert", or "remove". The actionContext property contains any values that you assigned to the actionContext parameter of the Sys.Data.AdoNetActionSequence.addInsertAction, Sys.Data.AdoNetActionSequence.addRemoveAction, or Sys.Data.AdoNetActionSequence.addUpdateAction methods. You store values in the context object if you must retrieve those values in the callback function.