Recall that you created a file called GIFT in HW5.

This table contains the name of a gift, the retail price of the gift, and the sale price for the gift. Assume that gift names are unique. We will attempt to access & update this file from C++.

http://www.tidytutorials.com/2009/08/connecting-to-sql-server-using-c-odbc.html

http://www.cplusplus.happycodings.com/Algorithms/code1.html

Write a C++ program which will have a function which will print out:

  • the rows in the GIFT table
  • the total retail price
  • the total sale price
  • the number of records
  • the average retail price
  • the average sale price

In your main program:

  • (a) print out the table
  • (b) insert two records
  • (c) print out the table
  • (d) update three records
  • (e) print out the table
  • (f) delete two records
  • (g) print out the table
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.