Goal: Write an application that allows the use to enter the airport of origin, airport of destination and day of week. The application outputs all of the relevant flights, including departure time, arrival time and price.
Input Database: A comma separated value file with the fields origin, destination, day, departure, arrival, price: flights.zip contains the Access database flights.mdb.
Input Combo Boxes (1) Airport Code of Origin, (2) Airport Code of Destination, (3) Day of Week. Include labels for each combo box.
Output Textbox A multiline textbox that outputs the time of departure, time of arrival and price for each flight that matches the input criteria. Set the Multiline property to True for the output textbox.
Submit Button When the submit button is clicked, execute an event handler that reads the input file flights.txt, selecting the files that match the input criteria, and displaying them in the output textbox.
Global Reference Variables connection, command, data adapter, dataset.
Pseudocode for Event Handlers
Create connection string object. Create connection object. Create command object. Create data adapter object. Create database object.
Create SQL statement based on combo box settings. Load SQL statement into command object. Clear dataset object. Fill dataset object from data adapter object. Display lines from dataset object in multiline textbox.