Thanks for the suggestion. I switched to a straight SQL statement, but still have two different lists coming in instead of a updating each record sequentially.
I'm pretty new at CF but I think I've got a handle on doing these one at a time, but doing multiple record updates is apparently beyond me. I can't find a good example to puzzle through. The idea is to update employee status by departments (one button updates all the daily attendance records for a department--say, 25 or 30 people (records) per Update button.) According to CF Debug, the proper values (only 2 numbers per record) pass successfully from the form page to the action page. But they're passed as two separate lists instead of in pairs. The two values from the form are EmpID_Muster (which is the key, some people think this is a problem) and Emp_Status, which are also the names of the SQL db columns. On the Action Form I want to match records against EmpID_Muster and then UPDATE Emp_Status (a value between 1 and 9). I've tried several iterations of this code, but I'm just not getting it. Am I on the wrong track? Is there an easier way? a better way? here's the code I'm working with now: <cfloop from="1" to="#ListLen(form.EmpID_Muster)#" index="i"> <cfquery name="qUpdate_Status" datasource="MorningMuster"> UPDATE Muster SET Emp_Status = #form.Emp_Status# WHERE EmpID_Muster = #form.EmpID_Muster# </cfquery> </cfloop> -----Original Message----- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Monday, 18 November, 2002 09:29 To: CF-Talk Subject: RE: CF SQL problem cfupdate is passing the entire value form.empid_muster, not one value at a time. Simply dump the cfupdate and switch to a real SQL insert. ======================================================================= Raymond Camden, ColdFusion Jedi Master for Hire Email : [EMAIL PROTECTED] WWW : www.camdenfamily.com/morpheus Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: Kennerly, Rick H CIV [mailto:[EMAIL PROTECTED]] > Sent: Monday, November 18, 2002 9:22 AM > To: CF-Talk > Subject: CF SQL problem > > > I've never seen this message before. Any ideas would be appreciated. > > Here's the code from the Action page: > > <cfloop from="1" to="#ListLen(Form.EmpID_Muster)#" index="i"> > <cfupdate datasource="MorningMuster" dbtype="ODBC" tablename="muster" > formfields="empID_muster, emp_status"> > </cfloop> > > And here's the info I get back from CF Debug > > Error Executing Database Query. Invalid data > 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 for CFSQLTYPE > CF_SQL_NUMERIC. > > > > Rick > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm