Validating the car type by using a lookup database
The rental agreement page includes the car_type field, which you can test to determine whether the field contains an allowed value.
The list of allowed car types includes the following types:
- Compact
- Standard
- Full size
- SUV
- Other
For each car type field, you test the field value and set the field status to 1.
There is a problem if the car type does not match one of the allowed types.
To use the lookup database, use these actions.
| Library | Action | Description |
|---|---|---|
| Lookup | OpenConnection | Uses a data source name or connection string to open a connection to a database. |
| Lookup | ExecuteSQL | Runs an SQL statement. Returns True if the SQL statement runs successfully and any SELECT statement returns a value. |
| Lookup | CloseConnection | Closes an open database connection. |