VALUES ('test', 'test', 'test', 'test', 1914, 204, 4, NULL,-->    <--- , '',
0, 0, 2)

Just after NULL, there is a blank entry which looks like #ShipBase# is not
being set to anything.

Paul.



-----Original Message-----
From: Ben Conner [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 6 November 2008 1:54 PM
To: cf-newbie
Subject: query syntax error

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:4133
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