Assume, there is a table structure as shown below.
Table name: tsales | |
salesperson_id int IDENTITY (1,1), lname varchar(30) NOT NULL, fname varchar(30) NOT NULL, sales_region char(1) NOT NULL, [this field always contains 1,2,3 or 4 ONLY] ytd_sales_p1 int, [these are the product sales for each of the companies 7 products] ytd_sales_p2 int, ytd_sales_p3 int, ytd_sales_p4 int, ytd_sales_p5 int, ytd_sales_p6 int, ytd_sales_p7 intThis table holds the current product sales (products 1 thru 7) for each salesperson. You should NOT allow the user to modify: the salesperson_id, fname (first name), lname (last name) or sales_region |
|
The table tsales is in a database named "gl001".
For a recordset, the credential string is: rs.open some_sql_string,"DSN=gl001;UID=gl001;PWD=11111;" For a connection, the credential string is: cn.open "gl001","gl001","11111" On all passes use:<form name="f1" action="http://auckland.bauer.uh.edu/sales_update.asp" method="post"> |
2. (50 points)
Create an asp program that shows product sales for all salespersons. Include all the columns in the database table tsales in the order shown at the top of the page (i.e., in the order they appear in the CREATE statement).
Order the report in ASCENDING sales_region order. Use the salesperson_id as the secondary sort parameter in ASCENDING order.
Additionally at the end of the report:
some_array_name = Array(value,value, ... ,value)
or without initial values either of these:
some_array_name = Array()
or
some_array_name = Array(number_of_array_elements)
Two dimensional arrays can be define with:
DIM name_of_the_array ( number_of_rows , number_of_columns )