Homework 09

Customer Data Management at SmallBank

Goal

By doing this homework you will learn about changing data in a remote (i.e., enterprise or cloud) database.
Microsoft and others call queries that insert, delete, and update existing records "Non-queries".

Context

"You are the victim of your own success!"
You are getting used to Ms. Lendalot showing up unannounced to your office.  The culture at the bank is quite informal.  Yet, her statement leaves you uncertain about how to respond.  You like the 'success' part of what she said, but you don't like the ‘victim’ part as much...  

source:memegenerator.net

Anyhow, you have no time to think it through because she continues: “ About that fantastic customer list app you built... the managers now want to be able to change the customer data stored in our database.  They say it would save them a lot of time if they could edit a misspelled customer last name or a wrong address right as they speak to the person.  As of now, they have to send a request-for-change to our IT department, which means that any document we print or publish for that customer before the correction has some wrong data.”
Ah! Now you get the meaning of ‘victim of your own success'.  Here it comes...
“Can you do it?” asks Ms. Lendalot.
“I am on it, Boss.”
"I like it when you say that" said she while leaving your office "It is becoming your catchphrase..."

Task

Build a proof-of-concept app that demonstrates that it is possible to change data stored in a remote database from an Excel screen.

    Criteria

  • The program starts with an empty screen (no data) and four buttons.  No need to copy exactly the colors and shapes in the video, provided that they look neat.
  • "Load Customer table" downloads Customer2 (NOT Customer) from SmallBankDB and shows it in a listobject
  • "Insert New Row" creates a new record on Customer2 on the database using the info found on the spreadsheet, and reloads the Customer2 table
  • "Delete Selected Row" finds the customer ID in the active row, deletes the record on the database that contains that customer ID, and reloads the Customer2 table
  • "Update Selected Row" finds the customer ID in the active row, updates the corresponding record in the database using the info found on the spreadsheet, and reloads the Customer2 table. NOTE: do not try to change the C_id on the screen. It will not work.

Notes

Customer2 is shared across many students. If you are testing your app at the same time as somebody else, you might see rows disappear and reappear seemingly randomly, as a result of the other students' activities.
Be a good classmate! Please add at least as many records than you delete, so that others can also test the table. It is ok to be funny and insert your favorite fictional characters or celebrities.
If you accidentally delete the whole table, message me asap, so I can restore it.

Known Bugs

1. There is a bug in the vLab at 7:40.  Dim c_id as Integer = ""   should be instead Dim c_id as String = ""
2. Under UpdateRowBtn_Click "c id" should be "c_id"

3. Under InsertRowBtn_Click, {0}  should be '{0}'