The connection string defines a set of parameters, for example, the driver to use, the destination database.  With some tasks, you may wish one or more of parameters to be configurable and the user to supply the actual value of these parameters. This is done by replacing each parameter value by a reference to an EDT task parameter.

There are three main steps:

  1. set up a connection string with static parameter values as described in:
  2. create the EDT parameter to be used to replace the connection string parameter value
  3. replace the static parameter value with the EDT task parameter reference, as described below

To replace a static parameter value with an EDT task parameter reference:

  1. On the Database/template tab or Data source/SQL tab, select the text in the connection string to be replaced by the parameter.
  2. Click the Merge Code icon to display the Insert Merge Code at Cursor Position dialog:
  3. Select the required EDT task parameter from the drop-down list.
  4. Click the associated Insert button.
  5. The dialog closes, a reference to the EDT task parameter appears in the connection string and the Connection icon is set to orange, indicating that there has been a modification to the string.

  6. Click Test. A dialog appears showing a field captioned with the label associated with the EDT task parameter, similar to the one shown below:
  7. Enter a suitable value for the parameter and click OK.
  8. You should see a confirmation dialog and the Connection icon change to green.

When a user loads the task, they are prompted to specify the parameter values:

 

Including Task Parameters in SQL Code