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
|
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.
=====================================================
