Use external data sources during validation
You might need to compare runtime field values to an external data source to determine whether the values on a page are valid. For example, you might need to determine whether the vendor information matches the information that is stored in a database of approved vendors.
The Lookup library includes actions for connecting to external data sources and running SQL statements. The available actions include the following.
| Library | Action | Description |
|---|---|---|
| Lookup | OpenConnection | Uses a data source name or connection string to open a connection to a database. |
| Lookup | ExecuteSQL | Runs a SQL statement. Returns True if the SQL statement runs successfully and any SELECT statement returns a value. |
| Lookup | CloseConnection | Closes an open database connection. |
For an example of how to use an external data source to complete validation, see the Use a lookup database to validate the car type topic.