Hey IF a patch is written for 6.1 to fix this "password / Access" issue
on cfupdate and cfinsert could the "Primary Key / cfupdate" issue also
be address?

 

Error message:

The field "ID," was not found in the Form input. This field is required
in order to do an UPDATE because it is part of the primary key for the
"tablename" table.

http://webforums.macromedia.com/coldfusion/messageview.cfm?catid=3
<http://webforums.macromedia.com/coldfusion/messageview.cfm?catid=3&thre
adid=380672> &threadid=380672

 

When using the formfields attribute in the cfupdate tag the primary key
must also be listed in the formfields attribute or else error will be
generated. This issue was introduced in CF MX.  CF 5 and earlier had no
problems.  I think it is a poor practice to update the primary key even,
if it is with the same value.

 

Code Example:
<cfset form.recordid=2>

<cfset form.MailList=2>

 

<cfupdate datasource="="data" tablename="MailListLog"
formfields="MailList">

 

Result error: 
Primary key field "RECORDID," not found.

The field "RECORDID," was not found in the Form input. This field is
required in order to do an UPDATE because it is part of the primary key
for the "MailListLog" table.

 

Work around code:

<cfset form.recordid=2>

<cfset form.MailList=2>

 

<cfupdate datasource="="data" tablename="MailListLog"
formfields="recordid ,MailList">

 

 

Mark W. Breneman
-Cold Fusion Developer
-Network Administrator
  Vivid Media
  [EMAIL PROTECTED]
  www.vividmedia.com <http://www.vividmedia.com/> 
  608.270.9770

 

 

-----Original Message-----
From: Christine Lawson [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2003 9:59 AM
To: CF-Talk
Subject: RE: Redsky-Still issues with CFINSERT and CFUPDATE.

 

I was reading through this thread but I don't see the error message. Can
someone post sample code (against cfsnippets) that produces the error
and the actual error text?

 

Thanks!

Christine

 

-----Original Message-----

From: Angel Stewart [mailto:[EMAIL PROTECTED] 

Sent: Monday, August 11, 2003 10:21 AM

To: CF-Talk

Subject: RE: Redsky-Still issues with CFINSERT and CFUPDATE.

 

 

Yes I do.

 

With Ablecommerce as well.

I think there is a workaround for Able, but I'm having trouble accessing
their support site. I don't know if the workaround would help with my
CFINSERT and CFUPDATE issues.

 

I am going through one particular application and manually changing the
insert/update statements now though. 

 

-Angel

 

 

-----Original Message-----

From: David Schmidt [mailto:[EMAIL PROTECTED] 

 

Are you still have the same issues, Angel?

 

 

 

 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to