You can use this code to examine your form field string. Change "myString" to
your variable.
<table>
<tr><th>Index</th><th>Character</th><th>ASCII</th></tr>
<cfloop from="1" to="#Len(myString)#" index="iChar">
<cfoutput><tr><td>#iChar#</td><td>#Mid(myString,iChar,1)#</td><td>#Asc(
Mid(myString,iChar,1))#</td></tr></cfoutput>
</cfloop>
</table>
And here's an ASCII chart:
http://www.jimprice.com/jim-asc.htm
-David
On Friday, June 01, 2001 8:12 AM, Willy Ray [SMTP:[EMAIL PROTECTED]] wrote:
> Good questions. The data type of the field is (MS Access) Memo. The string
> is about 1400 characters. But I've been doodling around this morning with
> it, and I've gotten it to take strings up to 2500 characters. The problem
> seems to be that I'm passing some sort of carriage return that's mucking up
> my statement. If I could just find and replace it, but I can't even figure
> out what the character is...
>
>
>
> >>> [EMAIL PROTECTED] 6/1/01 8:51:54 AM >>>
> what's the data type of the field objectcontent and exactly how long is your
> string?
>
> -----Original Message-----
> From: Willy Ray [mailto:[EMAIL PROTECTED]]
> Sent: 01 June 2001 15:40
> To: CF-Talk
> Subject: Re: Crazy Dynamic Update/FORM Structure question
>
>
> Ok, I tried plugging the content into a test update statement that I knew
> was working. Bombed out. Same error. There's either something in my text
> string that's causing a failure, or access/ODBC won't accept that big of a
> string. Any thoughts on making it do this?
>
> Willy
>
> >>> [EMAIL PROTECTED] 5/31/01 2:10:41 PM >>>
>
> 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