129
CHAPTER 12
Lesson 9: Enabling Database Maintenance
In this lesson, you will enable maintenance of the trips database. The exercises will guide you
through the steps of adding the database update logic to delete trips, add new trip offerings, and
update existing trips in the Compass Travel database.
This lesson contains the following exercises:
Exercise 1: Deleting the current trip record shown on the Trip Detail page . . . . . . . . . . . . . . 129
Exercise 2: Adding trips with SQL INSERT statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Exercise 3: Adding data using the cfinsert tag. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Exercise 4: Updating a SQL row using the cfupdate tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Exercise 5: Linking the Trip Edit page to the main page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Exercise 6: Inserting values in the edit form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
ColdFusion tags introduced in this lesson
The following table identifies the ColdFusion tags that you use in this lesson to enhance the
ColdFusion application:
Exercise 1: Deleting the current trip record shown on the Trip
Detail page
In
“Lesson 8: Implementing Browsing and Searching” on page 123
, you created the
tripeditaction.cfm page to contain server side edits for the trip edit data entry form. In this lesson,
you complete the tripeditaction.cfm page.
Before you can write the code to delete a trip, you must understand the underlying SQL
statement to delete rows from the trips table.
Element
Type
Description
cfinsert
Tag
Inserts records in a JDBC data source.
cfupdate
Tag
Updates records in a JDBC data source.
Содержание COLFUSION MX 7-GETTING STARTED BUILDING COLDFUSION...
Страница 1: ...COLDFUSION MX7 Getting Started Building ColdFusion MX Applications...
Страница 6: ...6 Contents...
Страница 10: ......
Страница 14: ...14 Chapter 1 Introducing ColdFusion MX...
Страница 38: ...38 Chapter 3 Database Fundamentals...
Страница 40: ......
Страница 58: ...58 Chapter 5 Lesson 2 Configuring Your Development Environment...
Страница 70: ...70 Chapter 6 Lesson 3 Retrieving Data...
Страница 84: ...84 Chapter 7 Lesson 4 Building Dynamic Queries...
Страница 96: ...96 Chapter 8 Lesson 5 Creating a Trip Detail Page...
Страница 102: ...102 Chapter 9 Lesson 6 Creating a Main Application Page...