Professional Web Applications Themes

Content from a memo field: converting the rich text into plain text - ASP

Hi folks, I have an Access 2000 db with a memo field. Into the memo field I put text with bold attributes, URL etc etc What I need to to is converting the rich text contained into the memo field in plain text. That's because I truncate the string text but if, when I truncate it there's a rich tag the code following the truncated string is corrupted. Don't know if it's clear enough. Just to summarize: 1) memo field cointaining rich text 2) I need to transform it in plain text Thanks in advance Paolo...

  1. #1

    Default Content from a memo field: converting the rich text into plain text

    Hi folks,
    I have an Access 2000 db with a memo field.
    Into the memo field I put text with bold attributes, URL etc etc

    What I need to to is converting the rich text contained into the memo
    field in plain text.
    That's because I truncate the string text but if, when I truncate it
    there's a rich tag the code following the truncated string is corrupted.

    Don't know if it's clear enough.

    Just to summarize:

    1) memo field cointaining rich text
    2) I need to transform it in plain text

    Thanks in advance
    Paolo


    Alfredo Agosti Guest

  2. #2

    Default Re: Content from a memo field: converting the rich text into plain text

    ASP doesn't know what "rich text" is. All that's stored in the database is
    a big string.

    Maybe some of the following could help:
    [url]http://www.aspfaq.com/2395[/url]



    "Alfredo Agosti" <james_milanNOSPAMhotmail.com> wrote in message
    news:bkf6fk$13kur$1ID-83500.news.uni-berlin.de...
    > Hi folks,
    > I have an Access 2000 db with a memo field.
    > Into the memo field I put text with bold attributes, URL etc etc
    >
    > What I need to to is converting the rich text contained into the memo
    > field in plain text.
    > That's because I truncate the string text but if, when I truncate it
    > there's a rich tag the code following the truncated string is corrupted.
    >
    > Don't know if it's clear enough.
    >
    > Just to summarize:
    >
    > 1) memo field cointaining rich text
    > 2) I need to transform it in plain text
    >
    > Thanks in advance
    > Paolo
    >
    >

    Aaron Bertrand - MVP Guest

  3. #3

    Default Re: Content from a memo field: converting the rich text into plain text

    Thanks but it couldn't help.
    I need exactly the opposite.
    I have formatted (rich text or rtf text I don't know) text and I would
    convert it into plain text.

    But a text field can't contain bold reference so it must exist a way to
    strip the formatting codes from a memo field...

    James

    "Aaron Bertrand - MVP" <aaronTRASHaspfaq.com> wrote in message
    news:ef5qmRsfDHA.1832TK2MSFTNGP09.phx.gbl...
    > ASP doesn't know what "rich text" is. All that's stored in the
    database is
    > a big string.
    >
    > Maybe some of the following could help:
    > [url]http://www.aspfaq.com/2395[/url]
    >
    >
    >
    > "Alfredo Agosti" <james_milanNOSPAMhotmail.com> wrote in message
    > news:bkf6fk$13kur$1ID-83500.news.uni-berlin.de...
    > > Hi folks,
    > > I have an Access 2000 db with a memo field.
    > > Into the memo field I put text with bold attributes, URL etc etc
    > >
    > > What I need to to is converting the rich text contained into the
    memo
    > > field in plain text.
    > > That's because I truncate the string text but if, when I truncate it
    > > there's a rich tag the code following the truncated string is
    corrupted.
    > >
    > > Don't know if it's clear enough.
    > >
    > > Just to summarize:
    > >
    > > 1) memo field cointaining rich text
    > > 2) I need to transform it in plain text
    > >
    > > Thanks in advance
    > > Paolo
    > >
    > >
    >
    >

    Alfredo Agosti Guest

  4. #4

    Default Re: Content from a memo field: converting the rich text into plain text

    You could either (a) strip the references before storing them in the first
    place; (b) write a script that will remove the references from the database;
    or (c) use server.HTMLEncode() if you mean HTML and not rtf.




    "Alfredo Agosti" <james_milanNOSPAMhotmail.com> wrote in message
    news:bkf97g$121fs$1ID-83500.news.uni-berlin.de...
    > Thanks but it couldn't help.
    > I need exactly the opposite.
    > I have formatted (rich text or rtf text I don't know) text and I would
    > convert it into plain text.
    >
    > But a text field can't contain bold reference so it must exist a way to
    > strip the formatting codes from a memo field...
    >
    > James
    >
    > "Aaron Bertrand - MVP" <aaronTRASHaspfaq.com> wrote in message
    > news:ef5qmRsfDHA.1832TK2MSFTNGP09.phx.gbl...
    > > ASP doesn't know what "rich text" is. All that's stored in the
    > database is
    > > a big string.
    > >
    > > Maybe some of the following could help:
    > > [url]http://www.aspfaq.com/2395[/url]
    > >
    > >
    > >
    > > "Alfredo Agosti" <james_milanNOSPAMhotmail.com> wrote in message
    > > news:bkf6fk$13kur$1ID-83500.news.uni-berlin.de...
    > > > Hi folks,
    > > > I have an Access 2000 db with a memo field.
    > > > Into the memo field I put text with bold attributes, URL etc etc
    > > >
    > > > What I need to to is converting the rich text contained into the
    > memo
    > > > field in plain text.
    > > > That's because I truncate the string text but if, when I truncate it
    > > > there's a rich tag the code following the truncated string is
    > corrupted.
    > > >
    > > > Don't know if it's clear enough.
    > > >
    > > > Just to summarize:
    > > >
    > > > 1) memo field cointaining rich text
    > > > 2) I need to transform it in plain text
    > > >
    > > > Thanks in advance
    > > > Paolo
    > > >
    > > >
    > >
    > >
    >
    >

    Aaron Bertrand - MVP Guest

Similar Threads

  1. Postgresql Text field / Visual FoxPro Memo and ODBC
    By Scott Marlowe in forum PostgreSQL / PGSQL
    Replies: 12
    Last Post: January 13th, 03:01 AM
  2. Saving long text in a memo field
    By Bob Barrows in forum ASP Database
    Replies: 1
    Last Post: February 16th, 01:02 PM
  3. Missing text sections in layout printed to plain text
    By Eric Girouard in forum FileMaker
    Replies: 0
    Last Post: October 31st, 12:15 AM
  4. eruby: content-type is text/plain
    By Tobias Vogele in forum Ruby
    Replies: 0
    Last Post: October 18th, 03:32 PM
  5. losing text in memo field when double-spacing
    By Jocelyn in forum Microsoft Access
    Replies: 1
    Last Post: July 23rd, 04:05 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139