Database results using Access database

Posted on 1999-07-06
Medium Priority
Last Modified: 2013-12-24
I am querying an Access database using the database results webbot. The results format shows each field in the result set. One of those fields is a memo field (formatted as LONGVARCHAR). However, when the results are presented to the screen, all the formatting (e.g., paragraphs) is gone, and that field is one long run-on text. Is there a way to keep the formatting when presented to the screen via the database results?
Question by:DARRAH
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

mSH earned 400 total points
ID: 1867983
Asume that your field name is "user". Look in HTML source code, you'll see this line. (Each line is representing for a field in the recordset)

If Not IsEmpty(fp_rs) And Not (fp_rs Is Nothing) Then Response.Write CStr(fp_rs("user"))

You have to change it like this:
If Not IsEmpty(fp_rs) And Not (fp_rs Is Nothing) Then Response.Write Convert(CStr(fp_rs("user")))

And the funtion Convert is:
  Function Convert(strSource)
     strDest = strSource

'Add newline tag
     strDest = Replace(strDest, Chr(13), "<br>"&Chr(13))

'Change multi space into space tag
     strDest = Replace(strDest, "  ", " &nbsp;")
     strDest = Replace(strDest, "&nbsp; ", "&nbsp;&nbsp;")
     Convert = strDest
  End Function


Author Comment

ID: 1867984

Featured Post

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question