Here's my code, c/o UltraDev
Thankyou Jon, Scott, Phoeun, David & Simon for your time with this.
<cfscript>
// *** Delete Record: construct a sql delete statement and execute it
MM_editAction = CGI.SCRIPT_NAME;
If (CGI.QUERY_STRING NEQ "") MM_editAction = MM_editAction & "?" &
CGI.QUERY_STRING;
If (IsDefined("MM_delete") AND IsDefined("MM_recordId")) {
MM_datasource = "HCint";
MM_username = "";
MM_password = "";
MM_tableName = "input";
MM_tableCol = "HC_date";
MM_recordId = "'" & MM_recordId & "'";
MM_redirectPage = "int_mod2.cfm";
// create the delete sql statement
MM_deleteStr = "delete from " & MM_tableName & " where " & MM_tableCol & "
= " & MM_recordId;
// build the redirect URL
If (MM_redirectPage eq "") MM_redirectPage = CGI.SCRIPT_NAME;
If (Find("?", MM_redirectPage) EQ 0 AND CGI.QUERY_STRING NEQ "")
MM_redirectPage = MM_redirectPage & "?" & CGI.QUERY_STRING;
}
</cfscript>
<cfif IsDefined("MM_delete") AND IsDefined("MM_recordId")>
<cfquery datasource="#MM_datasource#" username="#MM_username#"
password="#MM_password#">
#PreserveSingleQuotes(MM_deleteStr)#
</cfquery>
<cflocation url="#MM_redirectPage#" addtoken="no">
</cfif>
<cfquery name="rsHCint" datasource="HCint" >
SELECT * FROM input ORDER BY HC_date DESC
</cfquery>
<cfset rsHCint_NumRows = 0>
<cfset rsHCint_Index = 1>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<table width="95%" border="0" align="center">
<tr>
<td width="15%">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"
size="5">Date</font></div>
</td>
<td width="19%">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"
size="5">Name</font></div>
</td>
<td width="54%">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"
size="5">Comment</font></div>
</td>
<td width="12%">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"
size="5">Delete</font></div>
</td>
</tr>
</table>
<br>
<table width="95%" border="0" align="center">
<cfoutput query="rsHCint">
<tr>
<td width="15%" height="50">
<div align="left"><font face="Verdana, Arial, Helvetica,
sans-serif">#rsHCint.HC_date#</font></div>
</td>
<td width="19%" height="50">
<div align="left"><font face="Verdana, Arial, Helvetica,
sans-serif">#rsHCint.HC_name#</font></div>
</td>
<td width="54%" height="50">
<div align="left"><font face="Verdana, Arial, Helvetica,
sans-serif">#rsHCint.HC_comment#</font></div>
</td>
<td width="12%" height="50">
<form name="form1" method="post" action="#MM_editAction#">
<div align="center"><font face="Verdana, Arial, Helvetica,
sans-serif">
<input type="submit" name="Submit" value="Delete">
</font> </div>
<input type="hidden" name="MM_recordId" value="#rsHCint.HC_date#">
<input type="hidden" name="MM_delete" value="true">
</form>
</td>
</tr>
</cfoutput>
</table>
</body>
</html>
----- Original Message -----
From: "Jon Hall" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, November 21, 2000 4:36 AM
Subject: Re: deleting records
> Could you post the actual cfquery statement? I am thinking it's probably
> quotes i nthe wronf place or something similar.
>
> jon
> ----- Original Message -----
> From: "Kylie Lovelock" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, November 20, 2000 11:35 AM
> Subject: deleting records
>
>
> > Evening all
> > The continuing saga of my learning curve kinda goes like this ....
> > I'm using UltraDev & have a page displaying all of the records in a
> table,
> > at the end of each record a have a form with a 'delete' button -
> everything
> > displays beautifully. In theory, after I deleting a record, you return
to
> > the same page. But I am getting this error after clicking the delete
> button.
> >
> > Error Diagnostic Information
> > ODBC Error Code = 22005 (Error in assignment)
> >
> > [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria
> > expression.
> >
> > The error occurred while processing an element with a general identifier
> of
> > (CFQUERY), occupying document position (26:1) to (26:88).
> >
> > My date field is the unique identifier (access general date format, time
> etc
> > included as not to double up). Any ideas where I'm going wrong?
> >
> > Thanks for your time
> >
> > Cheers
> > Kylie Lovelock
> >
> > When confronted by a difficult problem, you can solve it easily by
> > reducing the question to, "How would the Lone Ranger handle this?"
> >
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Structure your ColdFusion code with Fusebox. Get the official book at
> http://www.fusionauthority.com/bkinfo.cfm
> >
> > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
>
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists