Chapter 12: Lesson 9: Enabling Database Maintenance; Exercise 1: Deleting The Current Trip Record Shown On The Trip Detail Page - MACROMEDIA COLFUSION MX 7-GETTING STARTED BUILDING COLDFUSION MX Getting Started

Building coldfusion mx applications
Table of Contents

Advertisement

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 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:
Element
Type
cfinsert
Tag
cfupdate
Tag
Exercise 1: Deleting the current trip record shown on the Trip
Detail page
In
"Lesson 8: Implementing Browsing and Searching" on page
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.
Description
Inserts records in a JDBC data source.
Updates records in a JDBC data source.
CHAPTER 12
123, you created the
129

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents