You left out the closing ) after #form_Venue#')
----------------------------------------------^^

Don Vawter
www.cyberroomies.com
[EMAIL PROTECTED]

----- Original Message -----
From: "Bruce Sorge" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, September 05, 2001 7:53 AM
Subject: brain far


> Question,
>
> I am having a brain fart. I am entering information into a database, and
one of the fields takes in a comma separated list. The insert query is;
>
> <cfquery datasource="#WME.DSN#">
>  INSERT INTO Coupon (Vendor_ID, C_Title, C_Details, C_Inst, C_Valid,
C_Office, Venue_City_ID)
>  Values  (#qGetLastID.LastID#, '#Form.C_Title#', '#Form.C_Details#',
'#Form.C_Inst#', '#Form.C_Valid#', '#Form.C_Office#', '#Form.Venue#'
> </cfquery>
>
> The Venue_City_ID is the comma separated list. The field in the DB is a
text field (SQL Server 7). When I view the output, I get something like
'3,4,5'. I would think that this would be OK since everything is inside of
single quotes. However, I am receiving errors.
>
> ODBC Error Code = 37000 (Syntax error or access violation)
>
>
> [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2: Incorrect syntax
near '3,4,5'.
>
>
> SQL = "INSERT INTO Coupon (Vendor_ID, C_Title, C_Details, C_Inst, C_Valid,
C_Office, Venue_City_ID) Values (12, 'Ski Time', 'Test', 'Test', 'Test',
'Test', '3,4,5'"
>
> I know that there is a simple solution, but it really escapes me. This is
what happens when you have 5 projects all going at once.
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to