It looks like it is the ImageFile that is causing the issue.  Probably make
sure that there is a space in there or, like your other one, make it NULL if
your DB supports that.
Also, cfqueryparam.  It looks as though you are just testing, but throw
those in there!!

Rob

On Thu, Nov 6, 2008 at 1:54 PM, Ben Conner <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I'm getting the following error on an insert:
>
> [Macromedia][SQLServer JDBC Driver][SQLServer]Line 22: Incorrect syntax
> near ','.
>
> The error occurred in D:\sites\qcliving.com\htdocs\Admin\ProductForm.cfm:
> line 115
> Called from D:\sites\qcliving.com\htdocs\Admin\ProductForm.cfm: line 80
> Called from D:\sites\qcliving.com\htdocs\Admin\ProductForm.cfm: line 47
> Called from D:\sites\qcliving.com\htdocs\Admin\ProductForm.cfm: line 1
> Called from D:\sites\qcliving.com\htdocs\Admin\index.cfm: line 169
> Called from D:\sites\qcliving.com\htdocs\Admin\ProductForm.cfm: line 115
> Called from D:\sites\qcliving.com\htdocs\Admin\ProductForm.cfm: line 80
> Called from D:\sites\qcliving.com\htdocs\Admin\ProductForm.cfm: line 47
> Called from D:\sites\qcliving.com\htdocs\Admin\ProductForm.cfm: line 1
> Called from D:\sites\qcliving.com\htdocs\Admin\index.cfm: line 169
>
> 113 :                                   #crwidth#,
> 114 :                                   #crheight#,
> 115 :                                   #CurrentLevel#)
> 116 :
> 117 :           </cfquery>
>
> SQL        INSERT INTO Products(ProductName, Sku, ShortDesc, LongDesc,
> CategoryID, ManufacturerID, UnitCost, Weight, ShipBase, Image, ImgWidth,
> ImgHeight, ProductLevel) VALUES ('test', 'test', 'test', 'test', 1914, 204,
> 4, NULL, , '', 0, 0, 2)
>
> Productlevel is an Int field.  The source query is:
>
>                <cfquery name="LastProduct" datasource="#Application.DSN#">
>                        INSERT INTO Products(ProductName,
>                                                                 Sku,
>                                                                 ShortDesc,
>                                                                 LongDesc,
>                                                                 CategoryID,
>
> ManufacturerID,
>                                                                 UnitCost,
>                                                                 Weight,
>                                                                 ShipBase,
>                                                                 Image,
>                                                                 ImgWidth,
>                                                                 ImgHeight,
>
> ProductLevel)
>                        VALUES ('#ProductName#',
>                                        '#sku#',
>                                        '#ShortDesc#',
>                                        '#LongDesc#',
>                                        #CategoryID#,
>                                        #ManufacturerID#,
>                                        #UnitCost#,
>                                        <cfif weight GT
> 0>#Weight#<cfelse>NULL</cfif>,
>                                        #ShipBase#,
>                                        '#ImageFile#',
>                                        #crwidth#,
>                                        #crheight#,
>                                        #CurrentLevel#)
>                </cfquery>
>
> I've looked at this until my eyes are crossed and just don't see it.
>  Anyone?
>
> --Ben
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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-newbie/message.cfm/messageid:4134
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to