Updating Or Deleting Source Rows During Processing

Depending on your connections, there are two ways to update source rows using a DTS file:

Using a connection as both source and target

  1. From the Connection Manager:

    Note: Not all connections are valid for source and target connections. For example, the same text connection cannot be both a source and a target.

  2. From the Configure Source dialog box, select and configure the connection and data object you want to update.
  3. From the Configure Steps dialog box, select the same connection and data object.
  4. Configure the connection as desired, but be aware that any action you take on the target data for this connection affects the source data.

    Note: If you use a data source as both the source and a target connection, be aware that the target steps can affect the source data. If, for example, you have a Delete step, when the operation deletes data in the target, the data is also deleted in the source.

Using Update/Delete Source Rows

  1. Click Update Source in the Configure Source dialog box to define special actions that accompany source row processing.
  2. Select the operation you want to perform:

    Specify the field to be updated and the corresponding value to be stored when the integration condition occurs. The value can be a literal, such as the text "Integration Failed", or a formula, such as GETROWERROR function, which returns the error message from the failed row or an empty string for a successfully processed row.

  3. Select the field that you want to update.
  4. In the Value pane, do one of the following:
  5. Click OK to save your changes and close Update/Delete Source Rows.

Note: Some adapters do not support this feature. Refer to the adapter documentation for further information. 

Update Source Example

Set Update Source to Update source rows on success or failure. Select a field to be updated, such as Status. In the Value field, enter the function:

GETROWERROR()

When a row is successfully processed, the GETROWERROR returns an empty string, causing the Status field to be updated with an empty string.

When an error occurs, the GETROWERROR function returns the corresponding error message, which is written to the Status field.

See also

Configuring Target Steps

Data Objects tab

GETROWERROR

Modifying your Source configuration