I think what Matt is getting at is are you sure that the right piece of code
is running... possibly the code is running the insert when you think it is
running the update.
I would recommend testing it with something REALLY BASIC like this...
<!--- Posting to database instructions if updating information --->
<cfif IsDefined ("FORM.SelectUpdate")>
The update statement will run.
<cfabort>
<!--- if NOT an update, Post changed information to database ---->
<cfelse>
The insert statement will run.
<cfabort>
</cfif>
If you see a statement on the screen regarding the insert statement, you
know what the problem is - not your <cfupdate> - but, instead, your <cfif>
statement and/or your form.selectUpdate variable.
Kristi
----- Original Message -----
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 9:49 AM
Subject: Re: [KCFusion] CFUpdate
Are you sure "form.selectUpdate" is defined so it hits the cfupdate?
Katsuey <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
03/17/2004 07:58 AM
Please respond to KCFusion
To: [EMAIL PROTECTED]
cc:
Subject: [KCFusion] CFUpdate
I am using a form which allows you to choose between
updating and inserting a record. The first part works
well in that you choose the record you want to up
date and receive a form populated with all the
information in that record.
Now here's the problem: When it's suppose to be
updating a record, it creates a new record. Is there a
way with the CFUPDATE tag to specify that it should
NOT create a new record but rather update the selected
record?
<!--- Posting to database instructions if updating information --->
<cfif IsDefined ("FORM.SelectUpdate")>
<cfupdate datasource="TAKENOUT"
tablename ="TAKENOUT"
formfields="ID, CaseNo, FirstName, Initial, LastName, POBCity, POBState,
DOB, Age, MaritalStatus, DOD,
PODCity, PODState, ParentsFirstNames, ParentsLastName, SpouseFirstName,
SpouseLastName, Section,
BlockRow, Lot, Grave, ParishChurch, FuneralHome">
<!--- if NOT an update, Post changed information to database ---->
<cfelse>
<cfinsert datasource="TAKENOUT"
tablename="TAKENOUT"
formfields= "ID, CaseNo, FirstName, Initial, LastName, POBCity, POBState,
DOB, Age, MaritalStatus, DOD,
PODCity, PODState, ParentsFirstNames, ParentsLastName, SpouseFirstName,
SpouseLastName, Section,
BlockRow, Lot, Grave, ParishChurch, FuneralHome">
Peggie Brown
((( �.-���- ^~~ ^
( {>�Y�<}
\ )_ `~-~/�
\,,/,,/ \,,,�,,�
Brown Holdings LLC Group
http://www.BusinessSights.com Vision for your Business
http://www.RealGems.biz at Real Low Prices
913.727.1794
========================================================Kansas City
ColdFusion User Group's website & listserv is
hosted through the generous support of Clickdoug.com
To send email to the list, email [EMAIL PROTECTED]
To (un)subscribe, email [EMAIL PROTECTED] with your request.
For hosting solutions http://www.clickdoug.com
Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1.
=====================================================
=========================================================
Kansas City ColdFusion User Group's website & listserv is
hosted through the generous support of Clickdoug.com
To send email to the list, email [EMAIL PROTECTED]
To (un)subscribe, email [EMAIL PROTECTED] with your request.
For hosting solutions http://www.clickdoug.com
Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1.
======================================================