Thanks to all who responded this issue. Debugging showed that the query
would choke on one record contained single quotes. I escaped those, and
it works fine. Since all the records previous to the corrupted one were
ok, they were saved to the table. Commas are handled with no problem,
however.

Doug Jordon

[EMAIL PROTECTED] wrote:
> 
> It shouldn't matter what kind of field it is in the database.  You need to
> escape your comma's.
> 
> Try this.
> 
> <cfset message_body = Replace(query.BODY, ",", "Chr(44)", "ALL")>
> 
> <cfquery datasource="datasourcename">
>  insert into emails(SUBJECT,
>  FROMX,
>  TO,
>  DATEX,
>  BODY,
>  ATTACHMENTS,
>  CC,
>  MESSAGENUMBER,
>  ATTACHMENTFILES,
>  REPLYTO,
>  HEADER,
>  TIMEx)
> 
>   values ( '#query.SUBJECT#',
>   '#FROMX#',
>   '#query.TO#',
>   #DATEy#,
>   '#message_body#',
>   '#ATTACHMENTSX#',
>   '#query.CC#',
>   '#query.MESSAGENUMBER#',
>   '#ATTACHMENTFILESX#',
>   '#query.REPLYTO#',
>   '#query.HEADER#',
>   '#TIMEx#');
> 
>  </cfquery>
> 
> Then when you output it you do the opposite.
> 
> --K
> 
> ====================
> Katrina Chapman
> Consultant
> Ameriquest Mortgage
> 
> Douglas Jordon <[EMAIL PROTECTED]>
> 07/12/00 09:49 AM
> Please respond to cf-talk
> 
> 
>         To:     [EMAIL PROTECTED]
>         cc:
>         Subject:        Re: why is this happening?
> 
> That's interesting, because I had narrowed the fields down to one: the
> body field which of course contains commas(the data is email). How do I
> get around this? It's an Access database memo field.
> 
> DJ
> 
> "Dempsey, Timothy F." wrote:
> >
> > Doug,
> >
> > Could one of you values have a comma in it? That might make the database
> > think it has more values than you intend.
> >
> > -- Tim Dempsey
> >
> > -----Original Message-----
> > From: Douglas Jordon [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 12, 2000 11:06 AM
> > To: Cold Fusion List
> > Subject: why is this happening?
> >
> > Why would this query:
> >
> > <cfquery datasource="datasourcename">
> > insert into emails(SUBJECT,
> > FROMX,
> > TO,
> > DATEX,
> > BODY,
> > ATTACHMENTS,
> > CC,
> > MESSAGENUMBER,
> > ATTACHMENTFILES,
> > REPLYTO,
> > HEADER,
> > TIMEx)
> >
> >  values ( '#query.SUBJECT#',
> >  '#FROMX#',
> >  '#query.TO#',
> >  #DATEy#,
> >  '#query.BODY#',
> >  '#ATTACHMENTSX#',
> >  '#query.CC#',
> >  '#query.MESSAGENUMBER#',
> >  '#ATTACHMENTFILESX#',
> >  '#query.REPLYTO#',
> >  '#query.HEADER#',
> >  '#TIMEx#');
> >
> > </cfquery>
> >
> > return this error?:
> >
> > ODBC Error Code = 21S01 (Insert value list does not
> > match column list)
> >
> >  [Microsoft][ODBC Microsoft Access 97 Driver] Number
> > of query values and destination fields aren't the
> > same.
> >
> > What's also odd is that the data is being saved to the table.
> >
> > TIA,
> >
> > Doug Jordon
> >
> ----------------------------------------------------------------------------
> > --
> > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> > To Unsubscribe visit
> > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> > send a message to [EMAIL PROTECTED] with 'unsubscribe'
> in
> > the body.
> >
> ------------------------------------------------------------------------------
> > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> > To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe'
> in the body.
> ------------------------------------------------------------------------------
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe'
> in the body.
> 
> ------------------------------------------------------------------------------
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to