Basic HTML version of Foils prepared May 3 1998

Foil 47 Deleting Data

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


1 Deleting data in a database can be done with a single delete page. The delete page contains a CFQUERY tag with a SQL delete statement.
2 SQL delete statement is:
3 DELETE FROM tablename WHERE condition
4
5 <!-- Page to delete single employee record -->
6 <CFQUERY NAME="DeleteEmployee"
7 DATASOURCE="CF 3.0 Examples">
8 DELETE FROM Employees
9 WHERE Employee_ID = #URL.EmployeeID#
10 </CFQUERY>
11
12 <HTML>
13 <HEAD><TITLE>Delete Employee Record</TITLE></HEAD>
14 <H3>The employee record has been deleted.</H3>
15 </HTML>

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