Homework 08
Dynamic queries to access remote data
Goal
you will learn about automating 'dynamic' SQL queries. These are queries that can be customized by the user to obtain desired results.
As a bonus, you will learn about combo boxes.
Task
It is early morning and you just started your first cup when Ms. Lendalot walks into your office.
"Gooood morning! That app you built is faaan-tas-tic! None of my managers uses the old client reports anymore. They ALL use your Excel app to check
the lists of customers from the various states that we serve. It is faster and always uptodate. Exceptionally well done!"
Clearly your app was a success and Ms. Lendalot is in a good mood. Your day is starting well.
"I wonder if you could do something like that for our financial advisors... They often need to access historical stock data to answer customer
questions... I bet that they would love it!"
"Well, Ms. Lendalot, I...."
"But wait... maybe we cannot do it. Sometimes they need to see a basket of stock prices for a given date, and other times they need to see a range of
dates for a single stock. That sounds more complicated than the apps you did before. Do you think you can handle that?"
You flash a confident smile: "I am on it, Boss!"
Criteria
The SmallBankDB contains a table called StockMarket, which stores several months of closing prices for a basket of a dozen stock that have been selected by your financial director. Your job is to create an app that:
- connects with the database at startup. At startup the screen shows no stock data
- fills up two combo boxes with distinct dates and distinct tickers.
- shows all the available stock info for a given date at the press of an orange button (show all columns, orange cbox, and orange listobject)
- shows all the available info for a given stock when a blue button (show all columns, blue cbox, and blue listobject) is pressed
- uses only one listobject, recolored when the button s are pressed
The vLab below will put you on the right path towards a solution. Your stock market data will be different from what is shown in the video.