473,807 Members | 2,830 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Recordset value starting with "<" (less than sign) wont display

I am displaying some values on a report. I am opening the .asp page
with a
Response.Conten tType = "applicatio n/msword" and these particular
values appear in a table. One column shows percentages such as "5",
"95", "50", or "<5" There is no "%" character stored in the database
just the number (and the "<" sign if there is one).

Problem is NONE of the "<5" values appear in my report table. Does
this have something to do with "<" being an html character. The field
type is just a size 3 nvarchar. Relevant code below:

strSQL2 = "SELECT * FROM jambue.SUMMARY WHERE POSCODE = '" & id & "'
AND IDCODE1 ='" & dept & "' AND IDCODE2 ='" & unit & "'"
Set rstDBEdit2 = Server.CreateOb ject("ADODB.Rec ordset")
rstDBEdit2.Open strSQL2, CONN_STRING, adOpenKeyset, adLockOptimisti c,
adCmdText

<font face="Courier New" size="-1"><%=
rstDBEdit2.Fiel ds("H_STAP").Va lue %> %</font>
Jul 19 '05 #1
2 1904
Use Server.HTMLEnco de() if you want to display all symbols on the screen,
rather than use the exact text in your HTML. Otherwise, symbols like < will
get mixed with the other HTML content on your page and ahcnage the display.

E.g.

<%= Server.HTMLEnco de(rstDBEdit2.F ields("H_STAP") .Value) %>

The HTMLEncode method replaces certain symbols with the HTML equivalents. <
will be represented by &lt;

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"J.D. Buehls" <bu************ **@yahoo.com> wrote in message
news:73******** *************** ***@posting.goo gle.com...
I am displaying some values on a report. I am opening the .asp page
with a
Response.Conten tType = "applicatio n/msword" and these particular
values appear in a table. One column shows percentages such as "5",
"95", "50", or "<5" There is no "%" character stored in the database
just the number (and the "<" sign if there is one).

Problem is NONE of the "<5" values appear in my report table. Does
this have something to do with "<" being an html character. The field
type is just a size 3 nvarchar. Relevant code below:

strSQL2 = "SELECT * FROM jambue.SUMMARY WHERE POSCODE = '" & id & "'
AND IDCODE1 ='" & dept & "' AND IDCODE2 ='" & unit & "'"
Set rstDBEdit2 = Server.CreateOb ject("ADODB.Rec ordset")
rstDBEdit2.Open strSQL2, CONN_STRING, adOpenKeyset, adLockOptimisti c,
adCmdText

<font face="Courier New" size="-1"><%=
rstDBEdit2.Fiel ds("H_STAP").Va lue %> %</font>

Jul 19 '05 #2
Thanks for the reply!

I tried using the HTMLEncode method before making my first post. I had
thought about that having used the method before. However when I use
that on all my fields I still just get a blank. I checked uner VIEW -
HTML SOURCE inside WORD and this is in the spot where my recordset value
should be:

<td style='padding: 0in 0in 0in 0in'>
<p class=MsoNormal align=center style='text-align:center'>
<![if !supportEmptyPa ras]>&nbsp;<![endif]>
<span style='font-size:10.0pt'><o :p></o:p></span></p>
</td>
<5 %>
This is what is looks like for another percentage (100%)

<td style='padding: 0in 0in 0in 0in'>
<p class=MsoNormal align=center style='text-align:center'>< span
style='font-size:7.5pt;font-family:"Courier New"'>100 %</span><span
style='font-size:10.0pt'><o :p></o:p></span></p>
</td>
So it is getting screwed up somehow.

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
9038
by: Ensoul Chee | last post by:
I used #include <iostream.h> int m; cout << "Hexadecimal == 0x" << hex << m << endl; to print value of m in hexadecimal mode. But I got the compile error like this couttest.cpp:20 `hex' undeclared (first use this function)
1
6832
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document domDocument; Element domElement; // Root tag
16
1948
by: rik | last post by:
I was flicking through a PHP book (one of the teach in 24 hour ones) and I came across something I had never seen before in PHP. It was a method of printing out without using the print method, it was something like : <?= $myVar; ?> Is this an out dated method? Is it compatible with all versions of PHP (since implementation at least)?
3
2746
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the reports for "Category2<>'CONTRACTS'". I have reports at the plan (overall totals), department and division levels which have sorting and grouping implemented with this new
2
6863
by: andrew007 | last post by:
I do xml / xslt transformation using asp.net but I found any value (w/xml format) in xml node html-encoded to &lt and &gt format if it's > or < tag. Since I have sub xml data in a parent xml node as a value. Check out the following problem. I want to convert the value in <WpDatesXml> node to have a valid "<" and ">" instead of &lt or &gt format so that I can use this xml for another use. Please help! <NewDataSet> <Table1>
10
42972
by: Jon Noring | last post by:
Out of curiosity, may a CDATA section appear within an attribute value with datatype CDATA? And if so, how about other attribute value datatypes which accept the XML markup characters? To me, the XML specification seems a little ambiguous on this, so I defer to the XML authorities. Refer to sections 2.4 and 2.7 (it all hinges on if CDATA attribute values are part of markup or not.) Thanks.
12
6117
by: Filipe Sousa | last post by:
Hi! Could someone explain to me why this operation is not what I was expecting? int main() { int x = 2; std::cout << x << " " << x++ << std::endl; return 0; }
3
1725
by: hSiplu | last post by:
hi all, I am creating a web project with php/mysql. one of qeury result is too high. it returs several thousand rows. But I can't show them in one page. So I wanna create more than one pages then I shall use "<<previous<< 2 3 4 5 >>next>>" scheme. but i don't have any idea. If user clicks 3rd page. I shall show the 3rd page. How should I do this ? should I again query the whole or a portion ? what is the function
1
1792
by: hifiger2004 | last post by:
Hi Everyone, I have a problem with my classic asp programming. I think I missed something. I encountered logical error an hour ago. And below is one of the lines in my source code wherein I encountered error. As looking on the code below, I don't know if what was lacking, because it won't satisfy the condition, and it won't go to the next line "SaveRecord". I am actually generating a checkboxes, dynamically and the checkboxes are based...
0
9600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10628
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10373
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5547
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.