Ok, I'm having some trouble here.  I don't know what the form looks like, as it's 
being generated dynamically.  So, I figure, I'll have to loop through the FORM 
structure, and run a seperate update for each form element.

Here's what I'm doing:

<cfloop collection="#form#" item="i">

    <cfquery datasource="mydatasource">
     UPDATE contentitems
     SET objectcontent='#form["#i#"]#'
     WHERE objectname='#i#'
     AND page='#FORM.page#'
     </cfquery>

</cfloop>

Now the first element of the loop it will hit will be a field from the form called 
"Body."  It's the first possibility, alphabetically.  And value is going to be a 
really long string of text.  I've set "page" on the form earlier on.

It should come out like this:

UPDATE contentitems
SET objectcontent = 'great big long string of text...'
WHERE objectname = 'BODY'
AND page = '1'

And it does, but I get an error:

ODBC Error Code = 37000 (Syntax error or access violation)


[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query 
expression  "great big long string of text running out to a point at which it gets 
truncat'

Then it shows my sql, and it really does look like I had hope it would...Am I just 
missing something in my update statement?

Willy



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to