String truncated at the first space in the string

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default String truncated at the first space in the string

    Hi,

    A curious thing append here!

    The line #1 create a TableData (table cell), a textbox and assign the
    current Field Value to the texBtox value (Value=Field.Value)

    The line #2 create a TableData (table cell) and assing the field value
    to the Table cell.

    The line #3 was taken fron the view source for the concerned ASP page.
    As you can see the text is "Very good chocolat" in both case. But in
    line #1 I get only the word "Very" it's the same for every record. It's
    always truncated at the first 'space character' (chr(32)).

    Note: The String come from a standard text field from an Access 2000 db.
    The length in 50 charracters.

    1- Tmp = Tmp & "<TD BGCOLOR=" & sRowColor + " valign='Top'>" & _
    "<INPUT TYPE=Text NAME='Comment' SIZE=50 VALUE ="
    & _
    F.Value & "></TD>"
    2- Tmp = Tmp & "<TD BGCOLOR=" & sRowColor + " valign='Top'>" & _
    F.Value & "&nbsp;</TD>"


    3- <INPUT TYPE=Text NAME='Comment' SIZE=50 VALUE =Very good
    chocolat&nbsp></TD><TD BGCOLOR=#FFFFFF valign='Top'>Very good
    chocolat&nbsp;</TD></TR>

    Any idea will be appreciate
    thank's
    serge

    Serge Myrand Guest

  2. Similar Questions and Discussions

    1. String or binary data would be truncated error
      So... What is the problem? "J. Muenchbourg" <anonymous@devdex.com> wrote in message news:%23tgFGdYRDHA.2636@TK2MSFTNGP10.phx.gbl...
    2. #24777 [NEW]: $_GET values truncated at %3C in query string
      From: csnyder at chxo dot com Operating system: Linux / FreeBSD PHP version: 4.3.2 PHP Bug Type: Strings related Bug...
    3. #24591 [Bgs]: Using locale with , as decimal sep., floats truncated on conversion from string
      ID: 24591 User updated by: arnarb at oddi dot is Reported By: arnarb at oddi dot is Status: Bogus Bug Type: ...
    4. error: String or binary data would be truncated.
      I'm trying to fix the fax numbers in our contact table to have a "1-" in front of the number from: 800-555-1212 to: 1-800-555-1212 Here's...
    5. #24591 [Opn->Ver]: Using locale with , as decimal sep., floats truncated on conversion from string
      ID: 24591 Updated by: sniper@php.net Reported By: arnarb at oddi dot is -Status: Open +Status: ...
  3. #2

    Default Re: String truncated at the first space in the string

    Thank you very much,

    Do you know an equivalent in VBScript to the Delphi QuotedStr() method?

    serge


    "Ray at <%=sLocation%> [MVP]" wrote:
    > You have to enclose the value in quotes for the browser to know that the
    > value continues beyond the space.
    >
    > <input type="text" value="Very good chocolat">
    > vs.
    > <input type=text value=Very good chocolat>
    >
    > The browser will thing that "good" and "chocolat" are just some unrecognized
    > attributes and ignore the words.
    >
    > Ray at home
    >
    > "Serge Myrand" <info@softdelirium.qc.ca> wrote in message
    > news:40E98CB9.46E3B380@softdelirium.qc.ca...
    >
    > >
    > > 3- <INPUT TYPE=Text NAME='Comment' SIZE=50 VALUE =Very good
    > > chocolat&nbsp></TD><TD BGCOLOR=#FFFFFF valign='Top'>Very good
    > > chocolat&nbsp;</TD></TR>
    > >
    Serge Myrand Guest

  4. #3

    Default Re: String truncated at the first space in the string

    You have to enclose the value in quotes for the browser to know that the
    value continues beyond the space.

    <input type="text" value="Very good chocolat">
    vs.
    <input type=text value=Very good chocolat>

    The browser will thing that "good" and "chocolat" are just some unrecognized
    attributes and ignore the words.

    Ray at home


    "Serge Myrand" <info@softdelirium.qc.ca> wrote in message
    news:40E98CB9.46E3B380@softdelirium.qc.ca...
    >
    > 3- <INPUT TYPE=Text NAME='Comment' SIZE=50 VALUE =Very good
    > chocolat&nbsp></TD><TD BGCOLOR=#FFFFFF valign='Top'>Very good
    > chocolat&nbsp;</TD></TR>
    >

    Ray at Guest

  5. #4

    Default Re: String truncated at the first space in the string

    That wouldn't help you hear anyway. For one, you don't have to deal with '
    if you use " as your delimiter in your HTML. (Recommended) Also, in HTML,
    you cannot "escape" characters by doubling them up. You have to replace "
    with &quot;. Server.HTMLEncode will do that for you. Try this:

    <%
    sValue = "Joe's cat walked up to Mary O'Brien's dog and said, ""Meow!"""
    %>

    <input type="text" value="<%=Server.HTMLEncode(sValue)%>">

    Ray at home



    "Serge Myrand" <info@softdelirium.qc.ca> wrote in message
    news:40E98FE5.26871305@softdelirium.qc.ca...
    > Thank you very much,
    >
    > Do you know an equivalent in VBScript to the Delphi QuotedStr() method?
    >
    > serge
    >
    >
    > "Ray at <%=sLocation%> [MVP]" wrote:
    >
    > > You have to enclose the value in quotes for the browser to know that the
    > > value continues beyond the space.
    > >
    > > <input type="text" value="Very good chocolat">
    > > vs.
    > > <input type=text value=Very good chocolat>
    > >
    > > The browser will thing that "good" and "chocolat" are just some
    unrecognized
    > > attributes and ignore the words.
    > >
    > > Ray at home
    > >
    > > "Serge Myrand" <info@softdelirium.qc.ca> wrote in message
    > > news:40E98CB9.46E3B380@softdelirium.qc.ca...
    > >
    > > >
    > > > 3- <INPUT TYPE=Text NAME='Comment' SIZE=50 VALUE =Very good
    > > > chocolat&nbsp></TD><TD BGCOLOR=#FFFFFF valign='Top'>Very good
    > > > chocolat&nbsp;</TD></TR>
    > > >
    >

    Ray at Guest

  6. #5

    Default Re: String truncated at the first space in the string

    p.s. I know the difference between "hear" and "here." <blush!> :]

    Ray at home

    "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
    message news:%238PqF%23rYEHA.556@tk2msftngp13.phx.gbl...
    > That wouldn't help you hear anyway. For one, you don't have to deal with
    '


    Ray at Guest

  7. #6

    Default Re: String truncated at the first space in the string

    Thank's I will get a look.
    serge

    "Ray at <%=sLocation%> [MVP]" wrote:
    > That wouldn't help you hear anyway. For one, you don't have to deal with '
    > if you use " as your delimiter in your HTML. (Recommended) Also, in HTML,
    > you cannot "escape" characters by doubling them up. You have to replace "
    > with &quot;. Server.HTMLEncode will do that for you. Try this:
    >
    > <%
    > sValue = "Joe's cat walked up to Mary O'Brien's dog and said, ""Meow!"""
    > %>
    >
    > <input type="text" value="<%=Server.HTMLEncode(sValue)%>">
    >
    > Ray at home
    >
    > "Serge Myrand" <info@softdelirium.qc.ca> wrote in message
    > news:40E98FE5.26871305@softdelirium.qc.ca...
    > > Thank you very much,
    > >
    > > Do you know an equivalent in VBScript to the Delphi QuotedStr() method?
    > >
    > > serge
    > >
    > >
    > > "Ray at <%=sLocation%> [MVP]" wrote:
    > >
    > > > You have to enclose the value in quotes for the browser to know that the
    > > > value continues beyond the space.
    > > >
    > > > <input type="text" value="Very good chocolat">
    > > > vs.
    > > > <input type=text value=Very good chocolat>
    > > >
    > > > The browser will thing that "good" and "chocolat" are just some
    > unrecognized
    > > > attributes and ignore the words.
    > > >
    > > > Ray at home
    > > >
    > > > "Serge Myrand" <info@softdelirium.qc.ca> wrote in message
    > > > news:40E98CB9.46E3B380@softdelirium.qc.ca...
    > > >
    > > > >
    > > > > 3- <INPUT TYPE=Text NAME='Comment' SIZE=50 VALUE =Very good
    > > > > chocolat&nbsp></TD><TD BGCOLOR=#FFFFFF valign='Top'>Very good
    > > > > chocolat&nbsp;</TD></TR>
    > > > >
    > >
    Serge Myrand Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139