Ask a Question related to ASP Database, Design and Development.
-
Serge Myrand #1
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 & " </TD>"
3- <INPUT TYPE=Text NAME='Comment' SIZE=50 VALUE =Very good
chocolat ></TD><TD BGCOLOR=#FFFFFF valign='Top'>Very good
chocolat </TD></TR>
Any idea will be appreciate
thank's
serge
Serge Myrand Guest
-
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... -
#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... -
#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: ... -
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... -
#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: ... -
Serge Myrand #2
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 ></TD><TD BGCOLOR=#FFFFFF valign='Top'>Very good
> > chocolat </TD></TR>
> >Serge Myrand Guest
-
Ray at #3
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 ></TD><TD BGCOLOR=#FFFFFF valign='Top'>Very good
> chocolat </TD></TR>
>
Ray at Guest
-
Ray at #4
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 ". 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...unrecognized> 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>> > 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 ></TD><TD BGCOLOR=#FFFFFF valign='Top'>Very good
> > > chocolat </TD></TR>
> > >
Ray at Guest
-
Ray at #5
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
-
Serge Myrand #6
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 ". 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...> unrecognized> > 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> >> > > 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 ></TD><TD BGCOLOR=#FFFFFF valign='Top'>Very good
> > > > chocolat </TD></TR>
> > > >Serge Myrand Guest



Reply With Quote

