I forgot how access works, but SQL Server doesn't usually like those
double quotes.
Also, see if maybe CF is escaping any of those quotes in those CF variables.
I'd see what the CFQUERY is generating first, then run it in Access and
see how it fares there.
Fawzi Amadu wrote:
> Hello,
> I am in a quandary with my query, I have looked at it many times and cannot
> find the error. I am getting a "too few parameters" error on the line with
> variable filename8, any insight into how to solve this is welcome. TIA
>
> Code:
>
> <cfquery name="loadExtraImgs" datasource="#request.datasource#">
> Insert into Consumer_ProductExtraImgs(Cnsmr_ProductID,
> expandedImgID,
> ExpandedImg1,
> ExpandedImg2,
> ExpandedImg3,
> ExpandedImg4,
> ExpandedImg5,
> ExpandedImg6,
> ExpandedImg7,
>
> ExpandedImg8,
>
> DescriptionforExpandedImg1,
>
> DescriptionforExpandedImg2,
>
> DescriptionforExpandedImg3,
>
> DescriptionforExpandedImg4,
>
> DescriptionforExpandedImg5,
>
> DescriptionforExpandedImg6,
>
> DescriptionforExpandedImg7,
>
> DescriptionforExpandedImg8)
>
> Values('#(Session.ExtraProductImgName)#',
>
> '#(expandedImgID)#',
>
> '#(filename1)#',
>
> '#(filename2)#',
>
> '#(filename3)#',
>
> '#(filename4)#',
>
> '#(filename5)#',
>
> '#(filename6)#',
>
> '#(filename7)#',
>
> '#(filename8)#',
> "",
> "",
> "",
> "",
> "",
> "",
> "",
> "")
> </cfquery>
>
>
> And the error is:
>
> Error Executing Database Query.
>
> [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft
> Access Driver] Too few parameters. Expected 1.
>
> The error occurred in
> C:\ColdFusion8\wwwroot\e-danta\uploadExtraConsumerProductImages.cfm: line 112
>
> 110 : '#(filename6)#',
> 111 : '#(filename7)#',
> 112 : '#(filename8)#',
> 113 : "",
> 114 : "",
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321921
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4