Line Feeds within db fields

Results 1 to 4 of 4

Thread: Line Feeds within db fields

  1. #1
    Steven Woolston Guest

    Default Line Feeds within db fields

    I saw a thread yesterday which asked for advice on formatting long db fields that include line breaks. However, I didn&#039t see the answers that were given for it.<BR><BR>I want to format my form fields to include line breaks when they have been entered by my users. However, HTML interprets line breaks incorrectly and just adds the new line straight after the previous text.<BR><BR>I have been thinking that a REPLACE statement may work, but unsure of the syntax or where the placement of this REPLACE statement within my ASP coding.<BR><BR>Any help would be appreciated.<BR>Steven

  2. #2
    Join Date
    Dec 1969

    Default RE: Line Feeds within db fields

    &nbsp;<BR>txt = Replace( txt, vbCR, "<BR>" & vbCR )<BR><BR>That version has the advantage that *both* the line break characters *and* the HTML version of them are left in place.<BR>Makes it a *LOT* prettier if you ever do a "View &#124 Source" in the browser to see exactly what is being sent by ASP.<BR><BR>

  3. #3
    Steven Woolston Guest

    Default RE: Line Feeds within db fields

    Thanx Bill ... much appreciated.

  4. #4
    Steven Woolston Guest

    Default RE: Line Feeds within db fields

    Following on from this ...<BR><BR>When inserting output from a form field to an MS Access MEMO field (MS Access backend), the INSERT command is not working correctly.<BR><BR>When I &#039Len(Response.Write mBody)&#039 to view the length of the field, the length is shown properly. But when trying to insert the text into the field, it is being truncated and the following error is appearing.<BR><BR>*** Syntax error (missing operator) in query expression ***<BR><BR>I was under the assumption that an Access MEMO type field accepted almost limitless characters ... any ideas ?<BR><BR>Steven

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts