response.write

Discussion in 'ASP General' started by Hugh Welford, Jun 20, 2005.

  1. Hugh Welford

    Hugh Welford Guest

    Hi - trying to display a memo field using response.write but it truncates
    it. Is there a size issue with response.write? If so how do I get round it
    and to be able to display the whole memo field

    Thanks in advance

    Hugh
    Hugh Welford, Jun 20, 2005
    #1
    1. Advertising

  2. Hugh Welford

    Evertjan. Guest

    Hugh Welford wrote on 20 jun 2005 in
    microsoft.public.inetserver.asp.general:

    > Hi - trying to display a memo field using response.write but it
    > truncates it. Is there a size issue with response.write? If so how do
    > I get round it and to be able to display the whole memo field
    >


    Response.write is a serverside command
    to fill the renered html page with characters
    and has no size as such.

    Sizes are defined in clientside html or code.

    =================================

    <% for mySize = 10 to 22 step 2 %>

    <div style='font.size:<% = mySize %>pt;'>
    <% Response.write "Hello<br>world!" %>
    </div>

    <% next %>

    ==================================

    Inspect your rendered html (with view-source)
    and show us both your asp code and
    the rendered view-source for more help.

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
    Evertjan., Jun 20, 2005
    #2
    1. Advertising

  3. Hugh Welford

    Hugh Welford Guest

    Hi Evertjan - thanks for your response. Its not the font size that is the
    problem but the length of the text rendered. As you can see, the text is
    truncated as 256 characters - seems to think its a text field??? Hugh



    source code -

    strsql = "SELECT DISTINCT details.* FROM details WHERE PATID = " & found &
    ";"

    objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic, adcmdtext

    response.write "<br>" & objrec("about")

    the field "about" is a memo field

    rendered code -

    <table width="550" class = "second">

    <tr >

    <td height="2" width="304" >

    <div align="left"><!-- #BeginEditable "header" --><font color="#9E4E98"><img
    src="headers/blue_fullprofile1.gif" width="170" height="26"></font><!--
    #EndEditable --></div>

    </td>

    <td height="2" width="233">

    <div align="right"><font face="Verdana, Arial, Helvetica, sans-serif"
    size="2"> </font></div>

    </td>

    </tr>

    <tr valign="top">

    <td height="300" colspan="2"><!-- #BeginEditable "body" -->



    <br>I am 6foot, long dark hair, I represented Australia for the World
    champion cow paddy throwing competition. So as you can guess I am quiet fit
    and have attractive arms because I have to work out on the arm area so I can
    win the Grand Nationals... I love pa





    "Evertjan." <> wrote in message
    news:<Xns967BE7A7D7B81eejj99@194.109.133.242>...

    > Hugh Welford wrote on 20 jun 2005 in


    > microsoft.public.inetserver.asp.general:


    >


    > > Hi - trying to display a memo field using response.write but it


    > > truncates it. Is there a size issue with response.write? If so how do


    > > I get round it and to be able to display the whole memo field


    > >


    >


    > Response.write is a serverside command


    > to fill the renered html page with characters


    > and has no size as such.


    >


    > Sizes are defined in clientside html or code.


    >


    > =================================


    >


    > <% for mySize = 10 to 22 step 2 %>


    >


    > <div style='font.size:<% = mySize %>pt;'>


    > <% Response.write "Hello<br>world!" %>


    > </div>


    >


    > <% next %>


    >


    > ==================================


    >


    > Inspect your rendered html (with view-source)


    > and show us both your asp code and


    > the rendered view-source for more help.


    >


    > --


    > Evertjan.


    > The Netherlands.


    > (Replace all crosses with dots in my emailaddress)


    "Evertjan." <> wrote in message
    news:Xns967BE7A7D7B81eejj99@194.109.133.242...
    > Hugh Welford wrote on 20 jun 2005 in
    > microsoft.public.inetserver.asp.general:
    >
    > > Hi - trying to display a memo field using response.write but it
    > > truncates it. Is there a size issue with response.write? If so how do
    > > I get round it and to be able to display the whole memo field
    > >

    >
    > Response.write is a serverside command
    > to fill the renered html page with characters
    > and has no size as such.
    >
    > Sizes are defined in clientside html or code.
    >
    > =================================
    >
    > <% for mySize = 10 to 22 step 2 %>
    >
    > <div style='font.size:<% = mySize %>pt;'>
    > <% Response.write "Hello<br>world!" %>
    > </div>
    >
    > <% next %>
    >
    > ==================================
    >
    > Inspect your rendered html (with view-source)
    > and show us both your asp code and
    > the rendered view-source for more help.
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Replace all crosses with dots in my emailaddress)
    >
    Hugh Welford, Jun 20, 2005
    #3
  4. Hugh Welford

    Evertjan. Guest

    Hugh Welford wrote on 20 jun 2005 in
    microsoft.public.inetserver.asp.general:

    > Hi Evertjan - thanks for your response. Its not the font size that is
    > the problem but the length of the text rendered. As you can see, the
    > text is truncated as 256 characters - seems to think its a text
    > field??? Hugh
    >
    >
    >
    > source code -
    >
    > strsql = "SELECT DISTINCT details.* FROM details WHERE PATID = " &
    > found & ";"
    >
    > objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic,
    > adcmdtext
    >
    > response.write "<br>" & objrec("about")


    [please do not toppost on usenet]

    It is not the response.write that truncates,
    but probably your database "about" textfield
    that has a maximum of 256 characters.
    Evertjan., Jun 20, 2005
    #4
  5. Hugh Welford wrote:
    > Hi Evertjan - thanks for your response. Its not the font size that is
    > the problem but the length of the text rendered. As you can see, the
    > text is truncated as 256 characters - seems to think its a text
    > field??? Hugh
    >
    >
    >
    > source code -
    >
    > strsql = "SELECT DISTINCT details.* FROM details WHERE PATID = " &
    > found & ";"
    >
    > objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic,
    > adcmdtext
    >
    > response.write "<br>" & objrec("about")
    >
    > the field "about" is a memo field
    >


    http://www.aspfaq.com/show.asp?id=2188

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Jun 20, 2005
    #5
  6. Hugh Welford

    Hugh Welford Guest

    thanks evertjan - but as I said, its a "memo" field, and the text itself is
    complete in the field

    Hugh

    "Evertjan." <> wrote in message
    news:Xns967BECBE79203eejj99@194.109.133.242...
    > Hugh Welford wrote on 20 jun 2005 in
    > microsoft.public.inetserver.asp.general:
    >
    > > Hi Evertjan - thanks for your response. Its not the font size that is
    > > the problem but the length of the text rendered. As you can see, the
    > > text is truncated as 256 characters - seems to think its a text
    > > field??? Hugh
    > >
    > >
    > >
    > > source code -
    > >
    > > strsql = "SELECT DISTINCT details.* FROM details WHERE PATID = " &
    > > found & ";"
    > >
    > > objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic,
    > > adcmdtext
    > >
    > > response.write "<br>" & objrec("about")

    >
    > [please do not toppost on usenet]
    >
    > It is not the response.write that truncates,
    > but probably your database "about" textfield
    > that has a maximum of 256 characters.
    >
    >
    Hugh Welford, Jun 20, 2005
    #6
  7. Hugh Welford

    Evertjan. Guest

    Hugh Welford wrote on 20 jun 2005 in
    microsoft.public.inetserver.asp.general:
    > "Evertjan." <> wrote in message
    > news:Xns967BECBE79203eejj99@194.109.133.242...
    >> Hugh Welford wrote on 20 jun 2005 in
    >> microsoft.public.inetserver.asp.general:
    >>
    >> > Hi Evertjan - thanks for your response. Its not the font size that
    >> > is the problem but the length of the text rendered. As you can see,
    >> > the text is truncated as 256 characters - seems to think its a text
    >> > field??? Hugh
    >> >
    >> >
    >> >
    >> > source code -
    >> >
    >> > strsql = "SELECT DISTINCT details.* FROM details WHERE PATID = " &
    >> > found & ";"
    >> >
    >> > objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic,
    >> > adcmdtext
    >> >
    >> > response.write "<br>" & objrec("about")

    >>
    >> [please do not toppost on usenet]
    >>
    >> It is not the response.write that truncates,
    >> but probably your database "about" textfield
    >> that has a maximum of 256 characters.


    > thanks evertjan - but as I said, its a "memo" field, and the text
    > itself is complete in the field


    Could you test with:

    response.write len( objrec("about") ) & " Characters long<br>"

    ?

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
    Evertjan., Jun 20, 2005
    #7
  8. Hugh Welford

    Hugh Welford Guest

    it returns a null value - presumably as it is a memo field.

    Hugh

    "Evertjan." <> wrote in message
    news:Xns967BEF130F8EFeejj99@194.109.133.242...
    > Hugh Welford wrote on 20 jun 2005 in
    > microsoft.public.inetserver.asp.general:
    > > "Evertjan." <> wrote in message
    > > news:Xns967BECBE79203eejj99@194.109.133.242...
    > >> Hugh Welford wrote on 20 jun 2005 in
    > >> microsoft.public.inetserver.asp.general:
    > >>
    > >> > Hi Evertjan - thanks for your response. Its not the font size that
    > >> > is the problem but the length of the text rendered. As you can see,
    > >> > the text is truncated as 256 characters - seems to think its a text
    > >> > field??? Hugh
    > >> >
    > >> >
    > >> >
    > >> > source code -
    > >> >
    > >> > strsql = "SELECT DISTINCT details.* FROM details WHERE PATID = " &
    > >> > found & ";"
    > >> >
    > >> > objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic,
    > >> > adcmdtext
    > >> >
    > >> > response.write "<br>" & objrec("about")
    > >>
    > >> [please do not toppost on usenet]
    > >>
    > >> It is not the response.write that truncates,
    > >> but probably your database "about" textfield
    > >> that has a maximum of 256 characters.

    >
    > > thanks evertjan - but as I said, its a "memo" field, and the text
    > > itself is complete in the field

    >
    > Could you test with:
    >
    > response.write len( objrec("about") ) & " Characters long<br>"
    >
    > ?
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Replace all crosses with dots in my emailaddress)
    >
    Hugh Welford, Jun 20, 2005
    #8
  9. Hugh Welford

    Evertjan. Guest

    Hugh Welford wrote on 20 jun 2005 in
    microsoft.public.inetserver.asp.general:

    > "Evertjan." <> wrote in message
    > news:Xns967BEF130F8EFeejj99@194.109.133.242...
    >> Hugh Welford wrote on 20 jun 2005 in
    >> microsoft.public.inetserver.asp.general:
    >> > "Evertjan." <> wrote in message
    >> > news:Xns967BECBE79203eejj99@194.109.133.242...
    >> >> Hugh Welford wrote on 20 jun 2005 in
    >> >> microsoft.public.inetserver.asp.general:
    >> >>
    >> >> > Hi Evertjan - thanks for your response. Its not the font size
    >> >> > that is the problem but the length of the text rendered. As you
    >> >> > can see, the text is truncated as 256 characters - seems to
    >> >> > think its a text field??? Hugh
    >> >> >
    >> >> >
    >> >> >
    >> >> > source code -
    >> >> >
    >> >> > strsql = "SELECT DISTINCT details.* FROM details WHERE PATID = "
    >> >> > & found & ";"
    >> >> >
    >> >> > objrec.open strsql, objconn, adopenforwardonly,
    >> >> > adlockoptimistic, adcmdtext
    >> >> >
    >> >> > response.write "<br>" & objrec("about")
    >> >>
    >> >> [please do not toppost on usenet]
    >> >>
    >> >> It is not the response.write that truncates,
    >> >> but probably your database "about" textfield
    >> >> that has a maximum of 256 characters.

    >>
    >> > thanks evertjan - but as I said, its a "memo" field, and the text
    >> > itself is complete in the field

    >>
    >> Could you test with:
    >>
    >> response.write len( objrec("about") ) & " Characters long<br>"
    >>
    >> ?
    >>

    > it returns a null value - presumably as it is a memo field.


    Dear Hugh, why do you keep on topposting?
    I will not go on on a topposted thread.

    ================================

    If objrec("about") returns a string, it is immaterial if it comes from a
    memofield or a textfield.

    If it is a string with content it must have a positive integer length

    response.write len( objrec("about") )

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
    Evertjan., Jun 20, 2005
    #9
  10. Hugh Welford

    Hugh Welford Guest

    dont know what top-posting is - merely answering your kind replies to the
    group


    "Evertjan." <> wrote in message
    news:Xns967BF35C1C7C6eejj99@194.109.133.242...
    > Hugh Welford wrote on 20 jun 2005 in
    > microsoft.public.inetserver.asp.general:
    >
    > > "Evertjan." <> wrote in message
    > > news:Xns967BEF130F8EFeejj99@194.109.133.242...
    > >> Hugh Welford wrote on 20 jun 2005 in
    > >> microsoft.public.inetserver.asp.general:
    > >> > "Evertjan." <> wrote in message
    > >> > news:Xns967BECBE79203eejj99@194.109.133.242...
    > >> >> Hugh Welford wrote on 20 jun 2005 in
    > >> >> microsoft.public.inetserver.asp.general:
    > >> >>
    > >> >> > Hi Evertjan - thanks for your response. Its not the font size
    > >> >> > that is the problem but the length of the text rendered. As you
    > >> >> > can see, the text is truncated as 256 characters - seems to
    > >> >> > think its a text field??? Hugh
    > >> >> >
    > >> >> >
    > >> >> >
    > >> >> > source code -
    > >> >> >
    > >> >> > strsql = "SELECT DISTINCT details.* FROM details WHERE PATID = "
    > >> >> > & found & ";"
    > >> >> >
    > >> >> > objrec.open strsql, objconn, adopenforwardonly,
    > >> >> > adlockoptimistic, adcmdtext
    > >> >> >
    > >> >> > response.write "<br>" & objrec("about")
    > >> >>
    > >> >> [please do not toppost on usenet]
    > >> >>
    > >> >> It is not the response.write that truncates,
    > >> >> but probably your database "about" textfield
    > >> >> that has a maximum of 256 characters.
    > >>
    > >> > thanks evertjan - but as I said, its a "memo" field, and the text
    > >> > itself is complete in the field
    > >>
    > >> Could you test with:
    > >>
    > >> response.write len( objrec("about") ) & " Characters long<br>"
    > >>
    > >> ?
    > >>

    > > it returns a null value - presumably as it is a memo field.

    >
    > Dear Hugh, why do you keep on topposting?
    > I will not go on on a topposted thread.
    >
    > ================================
    >
    > If objrec("about") returns a string, it is immaterial if it comes from a
    > memofield or a textfield.
    >
    > If it is a string with content it must have a positive integer length
    >
    > response.write len( objrec("about") )
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Replace all crosses with dots in my emailaddress)
    >
    Hugh Welford, Jun 20, 2005
    #10
  11. Hugh Welford

    Hugh Welford Guest

    Thanks for your help Bob. The answer to the problem is that "select
    distinct" does NOT work, but "select" does.

    Regards Hugh


    "Bob Barrows [MVP]" <> wrote in message
    news:%...
    > Hugh Welford wrote:
    > > Hi Evertjan - thanks for your response. Its not the font size that is
    > > the problem but the length of the text rendered. As you can see, the
    > > text is truncated as 256 characters - seems to think its a text
    > > field??? Hugh
    > >
    > >
    > >
    > > source code -
    > >
    > > strsql = "SELECT DISTINCT details.* FROM details WHERE PATID = " &
    > > found & ";"
    > >
    > > objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic,
    > > adcmdtext
    > >
    > > response.write "<br>" & objrec("about")
    > >
    > > the field "about" is a memo field
    > >

    >
    > http://www.aspfaq.com/show.asp?id=2188
    >
    > Bob Barrows
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >
    Hugh Welford, Jun 20, 2005
    #11
  12. Damn, I missed that. I would have expected an error message from the attempt
    to use DISTINCT with a memo field, not truncation.

    Bob Barrows
    Hugh Welford wrote:
    > Thanks for your help Bob. The answer to the problem is that "select
    > distinct" does NOT work, but "select" does.
    >
    > Regards Hugh
    >
    >
    > "Bob Barrows [MVP]" <> wrote in message
    > news:%...
    >> Hugh Welford wrote:
    >>> Hi Evertjan - thanks for your response. Its not the font size that
    >>> is the problem but the length of the text rendered. As you can see,
    >>> the text is truncated as 256 characters - seems to think its a text
    >>> field??? Hugh
    >>>
    >>>
    >>>
    >>> source code -
    >>>
    >>> strsql = "SELECT DISTINCT details.* FROM details WHERE PATID = " &
    >>> found & ";"
    >>>
    >>> objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic,
    >>> adcmdtext
    >>>
    >>> response.write "<br>" & objrec("about")
    >>>
    >>> the field "about" is a memo field
    >>>

    >>
    >> http://www.aspfaq.com/show.asp?id=2188
    >>
    >> Bob Barrows
    >> --
    >> Microsoft MVP -- ASP/ASP.NET
    >> Please reply to the newsgroup. The email account listed in my From
    >> header is my spam trap, so I don't check it very often. You will get
    >> a quicker response by posting to the newsgroup.


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Jun 20, 2005
    #12
  13. Hugh Welford

    Evertjan. Guest

    Hugh Welford wrote on 21 jun 2005 in
    microsoft.public.inetserver.asp.general:
    > dont know what top-posting is


    =====================

    One of the most irritating habits on usenet

    > What is topposting?


    Yes, it is. see rfc1855

    > Is it against Netiquette?


    rfc1855 says:
    (quote)
    If you are sending a reply to a message or a posting be sure you
    summarize the original at the top of the message, or include just
    enough text of the original to give a context. This will make
    sure readers understand when they start to read your response.
    Since NetNews, especially, is proliferated by distributing the
    postings from one host to another, it is possible to see a
    response to a message before seeing the original. Giving context
    helps everyone. But do not include the entire original!
    (/quote)
    <http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc1855.html>

    > What does that rfc say?


    You could search Google for netiquette and topposting.

    > How do I learn more?



    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
    Evertjan., Jun 21, 2005
    #13
  14. Hugh Welford

    Ken Jenkins Guest

    who the hell cares if he topposts ?
    get a life..



    "Evertjan." <> wrote in message
    news:Xns967BF35C1C7C6eejj99@194.109.133.242...
    > Hugh Welford wrote on 20 jun 2005 in
    > microsoft.public.inetserver.asp.general:
    >
    >> "Evertjan." <> wrote in message
    >> news:Xns967BEF130F8EFeejj99@194.109.133.242...
    >>> Hugh Welford wrote on 20 jun 2005 in
    >>> microsoft.public.inetserver.asp.general:
    >>> > "Evertjan." <> wrote in message
    >>> > news:Xns967BECBE79203eejj99@194.109.133.242...
    >>> >> Hugh Welford wrote on 20 jun 2005 in
    >>> >> microsoft.public.inetserver.asp.general:
    >>> >>
    >>> >> > Hi Evertjan - thanks for your response. Its not the font size
    >>> >> > that is the problem but the length of the text rendered. As you
    >>> >> > can see, the text is truncated as 256 characters - seems to
    >>> >> > think its a text field??? Hugh
    >>> >> >
    >>> >> >
    >>> >> >
    >>> >> > source code -
    >>> >> >
    >>> >> > strsql = "SELECT DISTINCT details.* FROM details WHERE PATID = "
    >>> >> > & found & ";"
    >>> >> >
    >>> >> > objrec.open strsql, objconn, adopenforwardonly,
    >>> >> > adlockoptimistic, adcmdtext
    >>> >> >
    >>> >> > response.write "<br>" & objrec("about")
    >>> >>
    >>> >> [please do not toppost on usenet]
    >>> >>
    >>> >> It is not the response.write that truncates,
    >>> >> but probably your database "about" textfield
    >>> >> that has a maximum of 256 characters.
    >>>
    >>> > thanks evertjan - but as I said, its a "memo" field, and the text
    >>> > itself is complete in the field
    >>>
    >>> Could you test with:
    >>>
    >>> response.write len( objrec("about") ) & " Characters long<br>"
    >>>
    >>> ?
    >>>

    >> it returns a null value - presumably as it is a memo field.

    >
    > Dear Hugh, why do you keep on topposting?
    > I will not go on on a topposted thread.
    >
    > ================================
    >
    > If objrec("about") returns a string, it is immaterial if it comes from a
    > memofield or a textfield.
    >
    > If it is a string with content it must have a positive integer length
    >
    > response.write len( objrec("about") )
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Replace all crosses with dots in my emailaddress)
    >
    Ken Jenkins, Jun 21, 2005
    #14
  15. Hugh Welford

    Evertjan. Guest

    Ken Jenkins wrote on 21 jun 2005 in
    microsoft.public.inetserver.asp.general:
    > who the hell cares if he topposts ?


    Since you ask, I do.

    But you knew that, so why ask?

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
    Evertjan., Jun 21, 2005
    #15
    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. Charles A. Lackman
    Replies:
    2
    Views:
    7,974
    Charles A. Lackman
    Jan 11, 2006
  2. Matthew Wieder

    Response.Write and Response.Redirect

    Matthew Wieder, Jul 17, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    675
    Kevin Spencer
    Jul 17, 2003
  3. Sehboo
    Replies:
    3
    Views:
    8,762
    Sehboo
    Dec 10, 2003
  4. Replies:
    1
    Views:
    819
  5. slawekg

    Response.Write and Response.Redirect

    slawekg, Jun 21, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    365
    Alexey Smirnov
    Jun 21, 2007
Loading...

Share This Page