| Contents > Getting Started Building ColdFusion MX Applications > Lesson 6: Adding and Updating SQL Data > Completing the Trip Maintenance application > Writing code to save new trips to the database Exercise: insert trip data using cfinsert |
|
|
|
|
||
In this exercise, you change the approach the action page uses to insert the data into the database. You will replace the SQL INSERT statement with the cfinsert tag.
<cfquery name ="AddTrip" datasource="CompassTravel"> tag to the </cfquery> end tag).cfinsert tag to insert data into the trips table in the same location as the code that you just deleted:<cfinsert datasource="CompassTravel" tablename="TRIPS">
For more information about adding data to a database using the cfinsert tag, see Developing ColdFusion MX Applications.
|
|
||
| Contents > Getting Started Building ColdFusion MX Applications > Lesson 6: Adding and Updating SQL Data > Completing the Trip Maintenance application > Writing code to save new trips to the database Exercise: insert trip data using cfinsert |
|
|
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.