I swear I am workin too damn hard! That did it. Thanks! I promise never to
send another stupid mistake like this one to the list again until I have had
at least 3 latt�s.
----- Original Message -----
From: "Alex Santantonio" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, September 05, 2001 9:48 AM
Subject: RE: brain far
> Your brain far is that you are missing your closing ) on the end of the
SQL
> Statement.
>
> -----Original Message-----
> From: Bruce Sorge [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 05, 2001 9:54 AM
> To: CF-Talk
> 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.
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
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