- Contents
Interaction Designer Help
DB Fetch
This Database tool retrieves a record from a result set generated in a DB Query step.
For example, if the following result set is generated from a DB Query step.
The first time the DB Fetch step executes, it retrieves record with ID 123, and takes the success exit path. You can then pull values from any variables bound to the column values, as specified in the DB Query step. Then your handler would loop around and execute this DB Fetch step again. DB Fetch automatically retrieve the value of the next record, number 124. Each time the DB Fetch step executes, it retrieves the next value. When it reaches the empty record, the DB Fetch step fails and the loop ends.
In this example, you could write each value to a list of string for insertion into a web page, or some other operation.
Settings Page
Database Connection Variable
The name of a variable you created in a DB Get Connection step.
Timeout (seconds)
The number of seconds to wait for this operation to complete successfully before taking the failure path. Any value less than or equal to zero results in the default value of 60 seconds being used. You may specify a decimal value, such as 5.5.
Exit Paths
Success
If this step executes successfully, this step takes the Success exit path.
Failure
If this step does not execute successfully, this step takes the Failure exit path. This can occur when the parameters set in the DB query step were invalid, the DB connection variable is invalid, if the step times out before the fetch could be performed, or there were no more rows to be fetched from the result set. If there were no more rows to be fetched from the result set, this means either a) the fetch cycle is now complete, or b) there was no successful query performed before the fetch (this means that for this step, the handler author can't tell the difference between a "true" failure (like a lost DB connection) and a simple "you're at the end of the result set" indication.)