<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc = "http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
	<channel rdf:about="http://livedocs.adobe.com/">
	<title>LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-c19.htm</title>	
		<link>http://livedocs.adobe.com/</link>
		<description>Macromedia LiveDocs - online documentation with user feedback.</description>
		<copyright>Copyright 2009, Macromedia, Inc.</copyright>
		<dc:date>2009-11-25T04:18:59</dc:date>
		<dc:language>en-us</dc:language>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#30296" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#25341" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#11681" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#9339" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#9302" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#7809" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#1982" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#1961" />
			</rdf:Seq>
		</items>
	</channel>
	
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#30296">
		<title>coldfusion/6.1/htmldocs/tags-c19.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#30296</link>
		<description>It did happen on some my servers, all the &quot;CFUPDATE&quot; got the same error &quot;[Macromedia][Oracle JDBC Driver]Invalid parameter binding(s).&quot;, and this &quot;CFUPDATE&quot; can work on other servers.</description>
		<dc:creator>yunfengwu@yahoo.com</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-03-23T09:08:01</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#25341">
		<title>coldfusion/6.1/htmldocs/tags-c19.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#25341</link>
		<description>This is just FYI. You might get an error code that looks like this &lt;br /&gt;&lt;br /&gt;[Macromedia][SQLServer JDBC Driver]Invalid parameter binding(s). &lt;br /&gt;&lt;br /&gt;I got this error code on the cfupdate tag with a listed formfield. The error has an error, if you can imagine. &lt;br /&gt;&lt;br /&gt;on the debug info I noticed that it was trying to find a column named TYPETITLEABSTRACT.= (param 4)  Im my table those are 3 columns. The actual problem is that I have a column (none of the 3) specified in the form fields that is not in the table. However the error does not tell you that. You might be wasting your time trying to find out why CF is trying to combine those fields. It as simple as making sure the fields are available.</description>
		<dc:creator></dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2004-12-13T10:30:55</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#11681">
		<title>coldfusion/6.1/htmldocs/tags-c19.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#11681</link>
		<description>We are working to improve the examples in the ColdFusion reference pages. We propose to replace the current example on this page with the the following example. If you have any comments on this example, add them to this page.&lt;br /&gt;&lt;br /&gt;&lt;!--- This example allows you to update a person's telephone number in the employee table ---&gt;&lt;br /&gt;&lt;cfif isDefined(&quot;form.phone&quot;)&gt;&lt;br /&gt;	&lt;cfupdate datasource=&quot;cfsnippets&quot;&lt;br /&gt;      tablename=&quot;Employees&quot;&gt;&lt;br /&gt;&lt;/cfif&gt;&lt;br /&gt;&lt;br /&gt;&lt;cfquery name=&quot;empTable&quot; datasource=&quot;cfsnippets&quot;&gt;&lt;br /&gt;	select * from employees&lt;br /&gt;&lt;/cfquery&gt;&lt;br /&gt;&lt;br /&gt;&lt;!--- This code shows the contents of the employee table and allows you to choose a row for updating. ---&gt;&lt;br /&gt;&lt;table border=&quot;1&quot;&gt;&lt;br /&gt;&lt;cfoutput query=&quot;empTable&quot;&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;	&lt;td&gt;#firstName#&lt;/td&gt;&lt;td&gt;#lastName#&lt;/td&gt;&lt;td&gt;#phone#&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;cfupdate.cfm?id=#emp_id#&quot;&gt;Edit&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/cfoutput&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;cfif isDefined(&quot;url.id&quot;)&gt;&lt;br /&gt;&lt;cfquery name=&quot;phoneQuery&quot; datasource=&quot;cfsnippets&quot;&gt;&lt;br /&gt;	select * from employees where emp_id=#url.id#&lt;br /&gt;&lt;/cfquery&gt;&lt;br /&gt;&lt;!--- This code displays the row to edit for update ---&gt;&lt;br /&gt;	&lt;cfoutput query=&quot;phoneQuery&quot;&gt;&lt;br /&gt;		&lt;form action=&quot;cfupdate.cfm&quot; method=&quot;post&quot;&gt;&lt;br /&gt;      		 #phoneQuery.firstName# #phoneQuery.lastName# &lt;input name=&quot;phone&quot; type=&quot;text&quot; value=&quot;#phone#&quot; size=&quot;12&quot;&gt; &lt;input type=&quot;submit&quot; value=&quot;Update&quot;&gt;&lt;br /&gt;    		&lt;input name=&quot;emp_id&quot; type=&quot;hidden&quot; value=&quot;#emp_id#&quot;&gt;&lt;!--- The emp_id is passed as a hidden field to be used as a primary key in the CFUPDATE ---&gt;&lt;br /&gt;		&lt;/form&gt;&lt;br /&gt;	&lt;/cfoutput&gt;&lt;br /&gt;&lt;/cfif&gt;</description>
		<dc:creator>wlee</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2004-03-24T07:30:55</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#9339">
		<title>coldfusion/6.1/htmldocs/tags-c19.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#9339</link>
		<description>In response to Malvina: The word lies should be keys.&lt;br /&gt;&lt;br /&gt;In response to MarkZet: If you specify only the primary key, you are asking the database to update no fields in the table. ColdFusion generates an invalid SQL expression as a result (an empty set clause). We have submitted a bug (54462) against the fact that ColdFusion does not catch and report the invalid formfields value before generating the SQL and sending it to the data source.</description>
		<dc:creator>halL</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2004-03-02T06:46:15</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#9302">
		<title>coldfusion/6.1/htmldocs/tags-c19.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#9302</link>
		<description>I've found that if ONLY the primary key is passed in the fieldlist, an error occurs (&quot;You have an error in your SQL syntax&quot;).</description>
		<dc:creator>MarkZet</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2004-03-02T04:01:00</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#7809">
		<title>coldfusion/6.1/htmldocs/tags-c19.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#7809</link>
		<description>I do not understand this sentence:&lt;br /&gt;&lt;br /&gt;&quot;The formFields lies must include the database table primary key field, which must be present in the form. It can be hidden. &quot;&lt;br /&gt;&lt;br /&gt;comment&lt;br /&gt;My experience with cfupdate is:&lt;br /&gt;In cf 5 it was not necessary to include the formfields. In MX 6.1 it is required, otherwise I get an error of a missing key field.</description>
		<dc:creator>Malvina</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2004-02-11T12:37:52</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#1982">
		<title>coldfusion/6.1/htmldocs/tags-c19.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#1982</link>
		<description>There are several problems with this example.&lt;br&gt;&lt;br&gt;First, the cfsnippets Access database Courses table uses Name as a field name.&lt;br&gt;This is an Access reserved word and causes errors in cfupdate.&lt;br&gt;&lt;br&gt;Second, the example code inconsistently uses Name and Course_Name for the field name.&lt;br&gt;&lt;br&gt;Third, the example code attempts to include an mm_browsersniff.cfm file that is not likely to exist.&lt;br&gt;&lt;br&gt;ColdFusion bugs 53454 and 53455 have been logged against these issues.&lt;br&gt;&lt;br&gt;The following example code will work IF you rename the Number field to Course_Number in the snippets database.&lt;br&gt;It must be saved as index.cfm to work.&lt;br&gt;&lt;br&gt;&lt;!--- This example shows the use of CFUPDATE to change&lt;br&gt;records in a datasource. ---&gt;&lt;br&gt;&lt;!--- if course_ID has been passed to this form, then&lt;br&gt;perform the update on that record in the datasource ---&gt;&lt;br&gt;&lt;br&gt;&lt;cfif IsDefined(&quot;form.Course_ID&quot;)&gt;&lt;br&gt;   &lt;!--- check that course_id is numeric ---&gt;&lt;br&gt;      &lt;cfif Not IsNumeric(form.Course_ID)&gt;&lt;br&gt;         &lt;cfabort&gt;&lt;br&gt;      &lt;/cfif&gt;&lt;br&gt;   &lt;!--- Now, do the update ---&gt;&lt;br&gt;   &lt;cfupdate datasource=&quot;cfsnippets&quot;&lt;br&gt;      tablename=&quot;Courses&quot; &lt;br&gt;      formfields=&quot;Course_ID,Course_Number,Descript&quot;&gt;&lt;br&gt;&lt;/cfif&gt;&lt;br&gt;&lt;br&gt;&lt;!--- Perform a query to reflect any updated information if Course_ID is passed&lt;br&gt;through a url, we are selecting a record to update ... select only that &lt;br&gt;record with the WHERE clause. ---&gt;&lt;br&gt;&lt;cfquery name=&quot;GetCourseInfo&quot; DATASOURCE=&quot;cfsnippets&quot;&gt;&lt;br&gt;   SELECT Course_Number, Course_ID, Descript&lt;br&gt;   FROM Courses&lt;br&gt;      &lt;cfif IsDefined(&quot;url.Course_ID&quot;)&gt;&lt;br&gt;         WHERE Course_ID = #Trim(url.Course_ID)#&lt;br&gt;      &lt;/cfif&gt;&lt;br&gt;   ORDER by Course_Number&lt;br&gt;&lt;/cfquery&gt;&lt;br&gt;&lt;html&gt;&lt;br&gt;&lt;head&gt;&lt;br&gt;   &lt;title&gt;CFUPDATE Example&lt;/title&gt;&lt;br&gt;&lt;/head&gt;&lt;br&gt;&lt;body&gt;&lt;br&gt;&lt;br&gt;&lt;H3&gt;CFUPDATE Example&lt;/H3&gt;&lt;br&gt;&lt;!--- If we are updating a record, don't show the entire list. ---&gt;&lt;br&gt;&lt;cfif IsDefined(&quot;url.Course_ID&quot;)&gt;&lt;br&gt;   &lt;form method=&quot;post&quot; action=&quot;index.cfm&quot;&gt;&lt;br&gt;   &lt;H3&gt;You can alter the contents of this record, and then click &quot;Update&quot; &lt;br&gt;      to use CFUPDATE and alter the database&lt;/H3&gt;&lt;br&gt;   &lt;P&gt;Course Number &lt;INPUT TYPE=&quot;Text&quot; name=&quot;Course_Number&quot; value=&quot;&lt;cfoutput&gt;#Trim(GetCourseInfo.Course_Number)#&lt;/cfoutput&gt;&quot;&gt;&lt;br&gt;   &lt;P&gt;Course Description&lt;BR&gt;&lt;br&gt;   &lt;textarea name=&quot;Descript&quot; cols=&quot;40&quot; rows=&quot;5&quot;&gt;&lt;br&gt;      &lt;cfoutput&gt;#Trim(GetCourseInfo.Descript)#&lt;/cfoutput&gt;&lt;br&gt;   &lt;/textarea&gt;&lt;br&gt;&lt;br&gt;   &lt;input type=&quot;Hidden&quot; NAME=&quot;Course_ID&quot;&lt;br&gt;      value=&quot;&lt;cfoutput&gt;#Trim(GetCourseInfo.Course_ID)#&lt;/cfoutput&gt;&quot;&gt;&lt;br&gt;   &lt;p&gt;&lt;input type=&quot;Submit&quot; value=&quot;Click to Update&quot;&gt;&lt;br&gt;   &lt;/form&gt;&lt;br&gt;&lt;br&gt;&lt;cfelse&gt;&lt;br&gt;   &lt;!--- Show the entire record set in CFTABLE form ---&gt;&lt;br&gt;   &lt;cftable query=&quot;GetCourseInfo&quot; htmltable colheaders&gt;&lt;br&gt;      &lt;cfcol text=&quot;&lt;a href='index.cfm?Course_ID=#Trim(Course_ID)#'&gt;Edit Me&lt;/a&gt;&quot; &lt;br&gt;         width=10 header=&quot;Edit&lt;br&gt;this Entry&quot;&gt;&lt;br&gt;      &lt;cfcol text=&quot;#Trim(Course_Number)#&quot; WIDTH=&quot;4&quot; HEADER=&quot;Course Number&quot;&gt;&lt;br&gt;      &lt;cfcol text=&quot;#Trim(Descript)#&quot; WIDTH=100 HEADER=&quot;Course Description&quot;&gt;&lt;br&gt;   &lt;/cftable&gt;&lt;br&gt;&lt;/cfif&gt;&lt;br&gt;&lt;/body&gt;&lt;br&gt;&lt;/html&gt;</description>
		<dc:creator>halL</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2003-09-17T14:30:31</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#1961">
		<title>coldfusion/6.1/htmldocs/tags-c19.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#1961</link>
		<description>Following your example exactly,  I made a live database test. All seems fine, except that the &lt;cfupdate&gt; did not do ANYTHING. &lt;br /&gt;No data change happend.&lt;br /&gt;I am not sure if this is a problem on &lt;cfupdate&gt; or on the sample codes in this doc.&lt;br /&gt;If you would like to follow up, I will be more than happy to provide you my test codes and db results.&lt;br /&gt;&lt;br /&gt;Thanks!</description>
		<dc:creator>Pat Lib</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2003-09-17T08:39:18</dc:date>
	</item>
	</rdf:RDF>

