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


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.
SQL delete statement is:
DELETE FROM tablename WHERE condition
<!-- Page to delete single employee record -->
<CFQUERY NAME="DeleteEmployee"
DATASOURCE="CF 3.0 Examples">
DELETE FROM Employees
WHERE Employee_ID = #URL.EmployeeID#
</CFQUERY>
<HTML>
<HEAD><TITLE>Delete Employee Record</TITLE></HEAD>
<H3>The employee record has been deleted.</H3>
</HTML>



© 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