retrieving formatted messages from an ACCESS memo field.

Discussion in 'ASP General' started by Hugh Welford, May 21, 2004.

  1. Hugh Welford

    Hugh Welford Guest

    Hi ... My application saves variable length user-generated messages in an
    ACCESS memo field. ASP writes these messages correctly retaining CR LF to
    generate new paragraphs. (have checked this in the actual data base).

    However , when I retrieve a message into another web page, the CR LF
    characters are lost, and the message displays as one long sequence of
    unformatted text. Anyone any idea how I can overcome this?

    Using WIN XP/FP2000/IIS and the following code:-

    <%
    set objconn = server.createobject ("ADODB.connection")
    set objrec = server.createobject ("ADODB.recordset")
    objconn.open "DSN=daters"
    strsql = "SELECT messages.text FROM messages WHERE messid = 305 ;"
    objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic,adcmdtext
    %>

    <%=objrec("text")%>

    Thanks in advance Hugh
    Hugh Welford, May 21, 2004
    #1
    1. Advertising

  2. http://www.aspfaq.com/2188

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/




    "Hugh Welford" <> wrote in message
    news:#...
    > Hi ... My application saves variable length user-generated messages in an
    > ACCESS memo field. ASP writes these messages correctly retaining CR LF to
    > generate new paragraphs. (have checked this in the actual data base).
    >
    > However , when I retrieve a message into another web page, the CR LF
    > characters are lost, and the message displays as one long sequence of
    > unformatted text. Anyone any idea how I can overcome this?
    >
    > Using WIN XP/FP2000/IIS and the following code:-
    >
    > <%
    > set objconn = server.createobject ("ADODB.connection")
    > set objrec = server.createobject ("ADODB.recordset")
    > objconn.open "DSN=daters"
    > strsql = "SELECT messages.text FROM messages WHERE messid = 305 ;"
    > objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic,adcmdtext
    > %>
    >
    > <%=objrec("text")%>
    >
    > Thanks in advance Hugh
    >
    >
    Aaron Bertrand - MVP, May 21, 2004
    #2
    1. Advertising

  3. Hugh Welford

    Steven Burn Guest

    I just use something along the lines of;

    Replace(rst("TheText"), vbCrlf, "<br>")

    Which suffices......

    --

    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!


    "Hugh Welford" <> wrote in message
    news:#...
    > Hi ... My application saves variable length user-generated messages in an
    > ACCESS memo field. ASP writes these messages correctly retaining CR LF to
    > generate new paragraphs. (have checked this in the actual data base).
    >
    > However , when I retrieve a message into another web page, the CR LF
    > characters are lost, and the message displays as one long sequence of
    > unformatted text. Anyone any idea how I can overcome this?
    >
    > Using WIN XP/FP2000/IIS and the following code:-
    >
    > <%
    > set objconn = server.createobject ("ADODB.connection")
    > set objrec = server.createobject ("ADODB.recordset")
    > objconn.open "DSN=daters"
    > strsql = "SELECT messages.text FROM messages WHERE messid = 305 ;"
    > objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic,adcmdtext
    > %>
    >
    > <%=objrec("text")%>
    >
    > Thanks in advance Hugh
    >
    >
    Steven Burn, May 21, 2004
    #3
  4. Hugh Welford

    Hugh Welford Guest

    Thanks very much guys

    Hugh


    "Hugh Welford" <> wrote in message
    news:%...
    > Hi ... My application saves variable length user-generated messages in an
    > ACCESS memo field. ASP writes these messages correctly retaining CR LF to
    > generate new paragraphs. (have checked this in the actual data base).
    >
    > However , when I retrieve a message into another web page, the CR LF
    > characters are lost, and the message displays as one long sequence of
    > unformatted text. Anyone any idea how I can overcome this?
    >
    > Using WIN XP/FP2000/IIS and the following code:-
    >
    > <%
    > set objconn = server.createobject ("ADODB.connection")
    > set objrec = server.createobject ("ADODB.recordset")
    > objconn.open "DSN=daters"
    > strsql = "SELECT messages.text FROM messages WHERE messid = 305 ;"
    > objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic,adcmdtext
    > %>
    >
    > <%=objrec("text")%>
    >
    > Thanks in advance Hugh
    >
    >
    Hugh Welford, May 21, 2004
    #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:
    5,958
    =?Utf-8?B?TWF0dA==?=
    Apr 11, 2005
  2. Hanno

    Display an Access Memo field in a GridView or DetailsView

    Hanno, Aug 4, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    249
    Ken Cox [Microsoft MVP]
    Aug 6, 2006
  3. Jim Plante

    MS Access Memo Field and ASP

    Jim Plante, Aug 6, 2003, in forum: ASP General
    Replies:
    2
    Views:
    146
    MePadre
    Aug 6, 2003
  4. euang
    Replies:
    8
    Views:
    201
    Foo Man Chew
    Nov 24, 2003
  5. Vincent Lau

    Display Access memo field

    Vincent Lau, Sep 28, 2005, in forum: ASP General
    Replies:
    2
    Views:
    290
    Darryl
    Sep 28, 2005
Loading...

Share This Page