Oh.  So for null numeric fields, one has to put in "null"?  Why wouldn't
this have failed under Access?  Or is this part of the 'I'm a REAL
database' that SQL Server is enforcing? ;-)

--Ben

Mark Kruger wrote:

>Ben,
>
>Your syntax has commas in it that are not syntactically correct.... The
>error is telling you this -  incorrect syntax near ","
>
>Note this line in your insert code:
>
>njuice', '', 1903, 189, 123.45, , , 'clamprack
>
>
>See the three commas in a row? There should be something there... An empty
>string.. .a zero... The word "null" .... Something..
>
>-----Original Message-----
>From: Ben Conner [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, February 12, 2008 12: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:298805
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to