Homework Assignment #14
Most students completed this in class #12 on 5/07/2007.
Start
All Programs
Microsoft Office
Microsoft office Access 2003
File
New
Blank Database
select E: drive
You must then choose or create a subdir of E:
(I could not open the file in asp.net if directly in e:)
name: use your 3 char login
(it will create xxx.mdb)
e.g. e:\mydir\z9z.mdb
Create (new) table in design view
field name data type
paint color text
paint cost text
right click paint color
primary key
save as
name of table: paint
Dbl click paint table
add this data:
paint color paint cost
red red4.56
blue blue7.30
green green5.50
File save
X to close that screen
close access so it does not keep the file open
bring up Vis Studio
new web site
dbl click: drop down list
click funny arrow at top right of control
Select a data source
dbl click: access database
microsoft access data file:
enter the full pathname e.g. e:\mydir\z9z.mdb
(You usually cannot just browse to it.)
select columns:
paint color
paint cost
test query should show your 3 lines of data.
select a data field to display in the drop down list.
paint color
select a data field for the value of the drop down list.
paint cost (not paint color !!!)
finish
ok
start without debugging
test that the drop list allows you to select
from your 3 colors.
Next modify the application
to show the cost of that color paint
when a submit button is pressed.
(Hint: try to use similar code from homework 4)
To get credit for this assignment:
show the instructor the following:
run your program, select a color, and
it should show the proper price.
Run access to add another color and price.
restart your program from visual studio.
The new color should be in the drop down list.