[EMAIL PROTECTED] wrote:

Can anyone shed any light as to why an update page will update 50% of the time 
but sometimes return the error

[snip]

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 "faith" table.

[snip]

<cfform name="update_details" action="update_action.cfm?ID=<cfoutput>#URL.ID#</cfoutput>" 
method="Post">

[snip]

You need to pass the ID as a form variable rather than as part of your action, which would make it a URL variable rather than a FORM variable. CFUPDATE requires the all fields be passed as part of the form.
Use : <input type="hidden" name="ID" VALUE="<cfoutput>#URL.ID#</cfoutput>">


Of course, if URL.ID doesn't exist then you're still going to have a problem.

Try not to use cfinsert and cfupdate - they are just plain nasty and make your life more difficult than it could be by using SQL statements in a CFQUERY.

If you've got all that code in one page, then you need to look at breaking it up into seperate functional units rather than trying to do everything all in one place.


Stephen PS. Russ! What on earth has the forums done to this post???!!!



--
These lists are syncronised with the CFDeveloper forum at 
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
     *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
          *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]



Reply via email to