Home > Archive > FoxPro database connector > September 2005 > recording text with line breaks









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author recording text with line breaks
webmobile

2005-09-23, 11:24 am

I'm trying to insert/update a VFP8 Table memo field with text posted from a
HTML form (text area).
The code I'm using is this:

sql="UPDATE DATA2!personefisiche
SET memo=[" & trim(Request.Form("memo")) &
"] where codice=" & request.form("utente")"
conn.Execute sql, recordsaffected

It works perfectly with plain text but it don't work if I insert a line
break in text.
The query is not recognized even that looks well.
Any idea?

Thanks
paolo


Lee Mitchell

2005-09-23, 8:25 pm

Hi paolo:

Are you placing the data in a memo binary field or a memo filed? I would
use a memo binary field type.


I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/

*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/i...cid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003


>I'm trying to insert/update a VFP8 Table memo field with text posted from a
>HTML form (text area).
>The code I'm using is this:


>sql="UPDATE DATA2!personefisiche
SET memo=[" & trim(Request.Form("memo"))

&
>"] where codice=" & request.form("utente")"
>conn.Execute sql, recordsaffected


>It works perfectly with plain text but it don't work if I insert a line
>break in text.
>The query is not recognized even that looks well.
>Any idea?


>Thanks
>paolo


webmobile

2005-09-26, 11:24 am

Hi Lee,
I'm using a clasic memo field, but the problem is not in the field but in
the query.
the error is this:

Microsoft OLE DB Provider for Visual FoxPro error '80040e14'
Command contains unrecognized phrase/keyword.
/rapporti/memo.asp, line 28

The line mentioned is the one that executes the query:

<% sql=UPDATE DATA2!personefisiche
SET memo=[test test] where codice=11
conn.Execute sql, recordsaffected %> (this is line 28)

The memo value is a text. The text is in effect "Test "+Line break
(chr(13))+"Test"

If there is not line break the query is valid, if there is a line break the
error fires.

I can bypass the problem using a function that substiutes chr(13) with <br>
but I need a clean memo field and not a memo field with code.
Any sugegstion?
Paolo





"Lee Mitchell" <Leemi@online.microsoft.com> ha scritto nel messaggio
news:<3UIL9BIwFHA.768@TK2MSFTNGXA01.phx.gbl>...
> Hi paolo:
>
> Are you placing the data in a memo binary field or a memo filed? I would
> use a memo binary field type.
>
>
> I hope this helps.
>
> This posting is provided "AS IS" with no warranties, and confers no

rights.
>
> Sincerely,
> Microsoft FoxPro Technical Support
> Lee Mitchell
>
> *-- VFP9 HAS ARRIVED!! --*
> Read about all the new features of VFP9 here:
> http://msdn.microsoft.com/vfoxpro/
>
> *--Purchase VFP 9.0 here:
>

http://www.microsoft.com/PRODUCTS/i...cid=54787e64-52[color=darkred]
> 69-4500-8bf2-3f06689f4ab3&type=ovr
>
> Keep an eye on the product lifecycle for Visual FoxPro here:
> http://support.microsoft.com/gp/lifeselectindex
> - VFP5 Mainstream Support retired June 30th, 2003
> - VFP6 Mainstream Support retired Sept. 30th, 2003
>
>
a[color=darkred]
>
> &
>
>


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com