Week
13
Wednesday
Chapter 11
Database tip:
Before starting the tutorial make sure you have
the database file used for the tutorial if required, eg. Company.mdf file,
which is located in the student programs for Chapter 10 or 11. Make sure you
upload it with your homework. Otherwise, your program will crash without it.
So, it must be included with your project zipped. Also, remember after finding database, copy and paste it to
your project. You can put your database anywhere in the project, you just have
to remember the path of your project. I usually put it in the bin folder.
Tip for making sure your work does not upload corrupted:
You have to
click Save All so all the files for your project are created. If you don’t your
work can get corrupted. …. Remember “File Save All”
Tip
for working with web applications:
You need to
work with Visual Studio Web Developer 2008 Express Edition instead of Microsoft
Visual Basic 2008 Express Edition.
See Figure
11-2 (page 692) to see how to create a new application. Make sure your web application is inside a
folder so that when you create it, it does not include irrelevant files and
folders with it.
When you
want to execute your program, right click your
mouse, select view in browser. Do not use Debug anymore.
To upload
your work, make sure you save all, close it, open it again, look for Default.aspx, check that you have at least App_Data,
Default, Default.aspx.vb, and web files
and folders. If you only have one file, it is more than likely that the
work you have will be unusable in the future. Some students have this problem
because they use the H drive. Try to use the
default drive created by Visual Studio in Projects or C drive as in book. Then zip the parent folder and upload. As for the case of tutorial 11-2, the folder
“Click”.
Work
on Tutorial 11-1 page 695 “Creating the Click Application”
Work
on Tutorial 11-3 page 711 “Signing up for a Kayak Tour”
Note: typo page 713 lst
kayak.SelectIndex should be lstKayak.SelectIndex instead.
chkEquipment is a group
checkbox, not individual ones.
Work
on Tutorial 11-5 page 721 “Displaying the Karate Members table in a GridView”
Note: Create
your webapplication first. Look for karate.mdf from chapter 11 book code and
put it inside your new webapplication
that you created.
Figure
11-44 page 722 has the wrong instructions if you use the lab:
DataSource
is MicrosoftSQL Server Database File
Database
file name (new or existing): karate.mdf
Figure
11-45 page 722 should include a checkmark on ID, Last_Name, First_Name, Phone,
Date_Joined
To
do step 18 on page 724 make sure you highlight the Date_Joined fields to see
the properties window.
To
run (execute your application do not use debug, right click mouse and use view
in browser).
Tutorial 11-6 page 726 “Updating Karate Members”
You
just need to read from 726-728. You start at steps 1-22
Instead
of using DataGridView, we are using DetailsView. To get Delete, insert and
update, you need to use Advanced SQL options on page 729. Page 730 Step 15-16,
you need to click on the DetailView (which is dvwAddMember) and look in
properties for Fields. Then you will get the Fields dialog box. Then you click
on Selected fields to make changes to the fields. To change the order use the
arrow buttons.
After you zip your file and download it to a different location
on a computer or the same. Your project might appear to be corrupted. Don’t
worry. You can open all the files and view in browser and your code will still
work. Moreover, you work has not disappeared. So, if you change location of
your files remember to zip so that things work.
See preparation for Exam 2 and Exam 3