This section describes how to execute a SELECT query using the choices taken from the Route Form as query parameter values.
The query returns the routes that fit the route selection criteria and optionally, depending on the roundtrip flag, includes an additional OR clause for return journeys.
The queries that are used to return the route result set are:
SELECT route.rt_airline, airline.al_iatacode,
airline.al_name, route.rt_flight_num,
route.rt_depart_from, route.rt_arrive_to,
route.rt_depart_at, route.rt_arrive_at,
route.rt_arrive_offset, route.rt_flight_day
FROM route, airline
WHERE ((rt_depart_from = ? AND route.rt_arrive_to = ?))
AND route.rt_flight_day LIKE ? AND
route.rt_airline = airline.al_icaocode
ORDER BY route.rt_airline, route.rt_depart_from,
route.rt_flight_num
SELECT route.rt_airline, airline.al_iatacode,
airline.al_name, route.rt_flight_num,
route.rt_depart_from, route.rt_arrive_to,
route.rt_depart_at, route.rt_arrive_at,
route.rt_arrive_offset, route.rt_flight_day
FROM route, airline
WHERE ((rt_depart_from = ? AND route.rt_arrive_to = ?)
OR (route.rt_depart_from = ?
AND route.rt_arrive_to = ?))
AND route.rt_flight_day LIKE ?
AND route.rt_airline = airline.al_icaocode
ORDER BY route.rt_airline, route.rt_depart_from,
route.rt_flight_num
Clicking the Go button triggers the execution of the routeGoButton_Click event handler.
The event handler performs the following actions: