About this task
To be able to choose a database connection dynamically at runtime, we need to define a context variable, which will then be configure it in the Dynamic settings of the database input component.
In the Contexts view, click the [+] button to add a row in the table, click in
the Name field and enter a name for the
variable, myConnection in this
- From the Type list field, select List Of Value.
Click in the Value field and then click
the button that appears in the field to open the [Configure value of list] dialog box.
In the [Configure value of list] dialog
box, click the New... button to open the
[New Value] dialog box, and enter the
name of one of the connection components in the text field, tMysqlConnection_1 in this example. Then click
OK to close the dialog box.
Repeat this step to specify the other connection component name as another list item, tMysqlConnection_2 in this example.When done, click OK to close the [Configure Values] dialog box.
- Select the check box next to the variable value field, and fill the Prompt field with the message you want to display at runtime, Select a connection component: in this example.