Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Content from a memo field: converting the rich text into plain text

Reply
Thread Tools

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

 
 
Alfredo Agosti
Guest
Posts: n/a
 
      09-19-2003
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


 
Reply With Quote
 
 
 
 
Aaron Bertrand - MVP
Guest
Posts: n/a
 
      09-19-2003
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" <(E-Mail Removed)> wrote in message
news:bkf6fk$13kur$(E-Mail Removed)-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
>
>



 
Reply With Quote
 
 
 
 
Alfredo Agosti
Guest
Posts: n/a
 
      09-19-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:bkf6fk$13kur$(E-Mail Removed)-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
> >
> >

>
>



 
Reply With Quote
 
Aaron Bertrand - MVP
Guest
Posts: n/a
 
      09-19-2003
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" <(E-Mail Removed)> wrote in message
news:bkf97g$121fs$(E-Mail Removed)-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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:bkf6fk$13kur$(E-Mail Removed)-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
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rich:dataTable - rich:dataScroller Hollow Quincy Java 5 01-02-2012 08:59 PM
how to store/ retrieve display rich text using access memo field rajpsmohan@googlemail.com ASP General 4 04-06-2009 10:55 AM
Plain Text & Rich Text Formats Not Behaving: Thoughts On ? Robert11 Computer Support 9 11-28-2005 10:29 PM
(newb) converting seconds into plain english time units luke Ruby 4 07-07-2005 03:11 AM
Cannot insert Large text into Database Memo field Olaf Winterton ASP General 4 01-05-2004 06:09 PM



Advertisments