SetCurrentRow()
- Last UpdatedNov 25, 2015
- 1 minute read
Use the SetCurrentRow() method to set values for multiple columns at the same time. You must provide the column names to set and the corresponding values to be set, respectively, in the following two members of the Row parameter:
-
columnNames
-
columnValues
Syntax
result SetCurrentRow (
aaDBRow Row)
Parameters
Row
You can construct two ArrayList objects by using string constants or valid Archestra reference strings.
Remarks
When you construct the input ArrayList object, you can specify constants as well as valid ArchestrA reference strings.
Necessary conversions are performed internally to cast values to the specific column type.
The actual update to the data source is delayed until you call SaveChangesSync() or SaveChangesAsync().
If SetCurrentRow() encounters a failure to change a column, some columns may have already been changed in the internal dataset. In this case, the internal dataset reverts to the state it had immediately after the last update or SaveChanges() call. It is possible that this reversion of the internal dataset could undo changes applied prior to the current SetCurrentRow() call. For instance, if the script has a loop to modify 10 rows with SetCurrentRow() and nine rows return without a bad error code but the tenth row returns a bad error code, the internal dataset reverts to its state before the first SetCurrentRow() call.
Example
Dim inputCol as System.Collections.ArrayList;
Dim inputVal as System.Collections.ArrayList;
Dim inputRow as aaDBClient.aaDBRow;
inputCol = new System.Collections.ArrayList();
inputCol.Add("Name");
inputCol.Add("Description");
inputCol.Add("DateTime");
inputVal = new System.Collections.ArrayList();
inputVal.Add("Name");
inputVal.Add(me.strValue);
inputVal.Add(me.DT);
inputRow.columnNames = inputCol;
inputRow.columnValues = inputVal;