You have 13 items in the field names and are 
trying to insert 14 values.  you probably have an extra comma someplace

At 01:39 PM 2/12/2008, Adkins, Randy wrote:
>Is "WEIGHT" specified as a numeric field or varchar?
>If varchar, you need the '' relating to null.
>
>the same for ShipBase.
>
>Other than that, it looks okay to me.
>
>
>-----Original Message-----
>From: Ben Conner [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, February 12, 2008 1:35 PM
>To: CF-Talk
>Subject: DB Insert error in SQL Server
>
>Hi,
>
>I ported an application from Access to MS SQL Server and am getting an
>error when inserting a test record into a table:
>
>Error Executing Database Query.
>[Macromedia][SQLServer JDBC Driver][SQLServer]Line 21: Incorrect syntax
>near ','.
>
>The error occurred in
>D:\sites\adrenalinebikes.com\htdocs\Admin\ProductForm.cfm: line 121
>Called from D:\sites\adrenalinebikes.com\htdocs\Admin\ProductForm.cfm:
>line 78
>Called from D:\sites\adrenalinebikes.com\htdocs\Admin\ProductForm.cfm:
>line 77
>Called from D:\sites\adrenalinebikes.com\htdocs\Admin\ProductForm.cfm:
>line 44
>Called from D:\sites\adrenalinebikes.com\htdocs\Admin\ProductForm.cfm:
>line 1
>Called from D:\sites\adrenalinebikes.com\htdocs\Admin\index.cfm: line
>143 Called from
>D:\sites\adrenalinebikes.com\htdocs\Admin\ProductForm.cfm:
>line 121
>Called from D:\sites\adrenalinebikes.com\htdocs\Admin\ProductForm.cfm:
>line 78
>Called from D:\sites\adrenalinebikes.com\htdocs\Admin\ProductForm.cfm:
>line 77
>Called from D:\sites\adrenalinebikes.com\htdocs\Admin\ProductForm.cfm:
>line 44
>Called from D:\sites\adrenalinebikes.com\htdocs\Admin\ProductForm.cfm:
>line 1
>Called from D:\sites\adrenalinebikes.com\htdocs\Admin\index.cfm: line
>143
>
>119 :                     #ImageCR.width#,
>120 :                     #ImageCR.height#,
>121 :                     #CurrentLevel#)
>122 :         </cfquery>
>123 : <cfabort>
>
>SQL        INSERT INTO Products(ProductName, Sku, ShortDesc, LongDesc,
>CategoryID, ManufacturerID, UnitCost, Weight, ShipBase, Image, ImgWidth,
>ImgHeight, ProductLevel) VALUES ('benjuice', '', 'benjuice', '', 1903,
>189, 123.45, , , 'clamprack1.jpg', 329, 600, 2)
>DATASOURCE       adren
>VENDORERRORCODE       170
>
>The last 3 fields (imgwidth, imgheight, and productlevel) are all Int 4
>byte fields, nulls allowed.  Any idea what the issue might be?
>
>Thanks!
>
>--Ben
>
>+-------------------------------------------+
>+ Ben Conner            [EMAIL PROTECTED] +
>+ Web World, Inc.       888-206-6486        +
>+ PO Box 1122           480-704-2000        +
>+ Queen Creek, AZ 85242                     +
>+-------------------------------------------+
>
>
>
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298809
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to