Wilfred mentioned before that the syntax of your update statement is off..
Should be
Update tableFoo
set fooVar = "#form.somethign1#",
gooVar = "#form.something2#
.....
anyways, what I usually do when I get those DB errors is take the
generated SQL and place that in my query tool, I use Toad and tryto
run it there.. it's easier to work out the query problems there
On 2/8/07, John Eubanks <[EMAIL PROTECTED]> wrote:
> >to update multiple rows?
> >Do a google search for something like "coldfusion update multiple form rows"
> >
> >You'll get some good ideas there
> >
> >
> >On 2/8/07, John Eubanks <[EMAIL PROTECTED]> wrote:
> >>
> Greg, thanks for the help. It is very much appreciated. I got most of it
> working. However, this is the error I get now. Any ideas?
> ###################################################################################
> Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near
> ','.
>
> The error occurred in E:\InetUsers\CIC\reps_test\GetReps_Action_Next.cfm:
> line 18
>
> 16 : Update
> RepFinder_Basic.FirstName,RepFinder_Basic.LastName,RepFinder_Basic.Region,RepFinder_Basic.RepId,RepFinder_Ext.FirstName,RepFinder_Ext.LastName,RepFinder_Ext.Region,RepFinder_Ext.RepId,RepFinder_Ext.Phone,RepFinder_Ext.Ext,RepFinder_Ext.BegZip,RepFinder_Ext.EndZip
> 17 : Set RepFinder_Basic.FirstName =
> '#Evaluate("Form.FirstName" & ThisRow)#',RepFinder_Basic.LastName =
> '#Evaluate("Form.LastName" & ThisRow)#',RepFinder_Basic.Region =
> '#Evaluate("Form.Region" & ThisRow)#',RepFinder_Basic.RepId =
> '#Evaluate("Form.RepId" & ThisRow)#',RepFinder_Ext.FirstName =
> '#Evaluate("Form.FirstName" & ThisRow)#',RepFinder_Ext.LastName =
> '#Evaluate("Form.LastName" & ThisRow)#',RepFinder_Ext.Region =
> '#Evaluate("Form.Region" & ThisRow)#',RepFinder_Ext.RepId =
> '#Evaluate("Form.RepId" & ThisRow)#',RepFinder_Ext.Phone =
> '#Evaluate("Form.Phone" & ThisRow)#',RepFinder_Ext = '#Evaluate("Form.Ext" &
> ThisRow)#',RepFinder_BegZip = '#Evaluate("Form.BegZip" & ThisRow)#',EndZip =
> '#Evaluate("Form.EndZip" & ThisRow)#'
> 18 : WHERE RepFinder_Ext.BegZip = #Evaluate("Form.BegZip"
> & ThisRow)# AND RepFinder_Ext.EndZip = #Evaluate("Form.EndZip" & ThisRow)#
> 19 : </cfquery>
> 20 : </cfloop>
>
>
>
> --------------------------------------------------------------------------------
>
> SQL Update
> RepFinder_Basic.FirstName,RepFinder_Basic.LastName,RepFinder_Basic.Region,RepFinder_Basic.RepId,RepFinder_Ext.FirstName,RepFinder_Ext.LastName,RepFinder_Ext.Region,RepFinder_Ext.RepId,RepFinder_Ext.Phone,RepFinder_Ext.Ext,RepFinder_Ext.BegZip,RepFinder_Ext.EndZip
> Set RepFinder_Basic.FirstName = 'Jaso',RepFinder_Basic.LastName =
> 'Brown',RepFinder_Basic.Region = '842',RepFinder_Basic.RepId =
> '7110',RepFinder_Ext.FirstName = 'Jaso',RepFinder_Ext.LastName =
> 'Brown',RepFinder_Ext.Region = '842',RepFinder_Ext.RepId =
> '7110',RepFinder_Ext.Phone = '800-443-8166',RepFinder_Ext =
> '5267',RepFinder_BegZip = '29000',EndZip = '29699' WHERE RepFinder_Ext.BegZip
> = 29000 AND RepFinder_Ext.EndZip = 29699
> DATASOURCE 3iReps
> VENDORERRORCODE 102
> SQLSTATE HY000
> ####################################################################################
> It looks like it is having issues with the Where clause, but everything looks
> fine.
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2504
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15