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

Discussion in 'ASP General' started by Alfredo Agosti, Sep 19, 2003.

  1. 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, Sep 19, 2003
    #1
    1. Advertising

  2. 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:
    http://www.aspfaq.com/2395



    "Alfredo Agosti" <> wrote in message
    news:bkf6fk$13kur$-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, Sep 19, 2003
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:...
    > 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:
    > http://www.aspfaq.com/2395
    >
    >
    >
    > "Alfredo Agosti" <> wrote in message
    > news:bkf6fk$13kur$-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, Sep 19, 2003
    #3
  4. 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" <> wrote in message
    news:bkf97g$121fs$-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" <> wrote in message
    > news:...
    > > 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:
    > > http://www.aspfaq.com/2395
    > >
    > >
    > >
    > > "Alfredo Agosti" <> wrote in message
    > > news:bkf6fk$13kur$-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, Sep 19, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWF0dA==?=

    Update Access Memo field from ASP.NET

    =?Utf-8?B?TWF0dA==?=, Apr 11, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    6,040
    =?Utf-8?B?TWF0dA==?=
    Apr 11, 2005
  2. Lakshmi Narayanan.r

    How to handle Memo/text field in Mysql with Asp

    Lakshmi Narayanan.r, Dec 22, 2003, in forum: ASP General
    Replies:
    1
    Views:
    276
    Ray at
    Dec 22, 2003
  3. Olaf Winterton

    Cannot insert Large text into Database Memo field

    Olaf Winterton, Jan 5, 2004, in forum: ASP General
    Replies:
    4
    Views:
    327
    Olaf Winterton
    Jan 5, 2004
  4. Replies:
    4
    Views:
    443
    Bob Barrows
    Apr 6, 2009
  5. Hollow Quincy

    rich:dataTable - rich:dataScroller

    Hollow Quincy, Dec 30, 2011, in forum: Java
    Replies:
    5
    Views:
    4,864
    Arved Sandstrom
    Jan 2, 2012
Loading...

Share This Page