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:
- set up a connection string with static parameter values as described in:
- create the EDT parameter to be used to replace the connection string parameter value
- 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:
- On the Database/template tab or Data source/SQL tab, select the text in the connection string to be replaced by the parameter.
- Click the Merge Code icon to display the Insert Merge Code at Cursor Position dialog:
- Select the required EDT task parameter from the drop-down list.
- Click the associated Insert button.
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.
- Click Test. A dialog appears showing a field captioned with the label associated with the EDT task parameter, similar to the one shown below:
- Enter a suitable value for the parameter and click OK.
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