Basic HTML version of Foils prepared May 3 1998

Foil 46 Creating an Update Page with CFQUERY

From Java Blend and Cold Fusion High Level Database Interfaces CPS616 Web Technologies -- Spring 98. by Chao Wei Ou


1 SQL update statement is:
2 UPDATE tablename SET columnname = value WHERE condition
3
4 To update the record with the front end form from the example above using a CFQUERY use this syntax:
5
6 <CFQUERY NAME="UpdateEmployee"
7 DATASOURCE="CF 3.0 Examples">
8 UPDATE Employees
9 SET Firstname='#Form.Firstname#',
10 LastName='#Form.LastName#',
11 Phone='#Form.Phone#'
12 WHERE Employee_ID=#Employee_ID#
13 </CFQUERY>

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998