473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Superscript (TM) in SQL string using ASP?

MBS
I am trying to pass a string from one page to another. The input
string comes from a database and many times has the superscript TM
trademark symbol. The querystring handles this properly because it
appears correctly in the next pages URL. However, when I do a
response.write of the querystring, the symbol has been changed to
"ProductT" for example so I can't assign this to an SQL string. Of
course, the database dosen't return this. How can I get around this?

Thanks
Bailey--
Jul 19 '05 #1
5 6101
MBS wrote:
I am trying to pass a string from one page to another. The input
string comes from a database and many times has the superscript TM
trademark symbol. The querystring handles this properly because it
appears correctly in the next pages URL. However, when I do a
response.write of the querystring, the symbol has been changed to
"ProductT" for example so I can't assign this to an SQL string. Of
course, the database dosen't return this. How can I get around this?

Thanks
Bailey--


Depending on where you are writing it to, you may need to use the HTMLEncode
function to handle the non-standard characters.

HTH,
Bob Barrows

--
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"
Jul 19 '05 #2
MBS
Can you elaborate further on how to implement this function in this
context? The string (containing the superscript) will be used in an
SQL "where" clause to re-query the database. I looked up the function
but I guess I am not knowledgeable enough to understand how it relates
to this. I also did a search on google to see how superscript and
other non-standard characters are handled in sql strings using ado and
surprisingly can't find anything.

Thanks.
Jul 19 '05 #3
MBS wrote:
Can you elaborate further on how to implement this function in this
context? The string (containing the superscript) will be used in an
SQL "where" clause to re-query the database. I looked up the function
but I guess I am not knowledgeable enough to understand how it relates
to this. I also did a search on google to see how superscript and
other non-standard characters are handled in sql strings using ado and
surprisingly can't find anything.

Thanks.


Without seeing your code, the only thing I can say is:

response.write htmlencode(<whatever>))

Bob Barrows

--
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"
Jul 19 '05 #4
MBS
Okay, here is some of the relevant code.

Here is the needed string with the "TM" getting past from the first
page:
Meniett™ Ménière's Disease Therapy Device

LinkText = Replace(Request.QueryString("LinkText"), "'", "''")
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_Conn_Xom_STRING
SQL ="SELECT distinct category, subcat FROM GroupInfo Where Category
='"&LinkText&"'" & "ORDER BY subcat"
Recordset1.Source = SQL

response.write server.htmlencode(SQL)
'= MeniettT Ménière''s Disease Therapy Device
'This is the same output as when not using the htmlencode! What am I
missing?

Recordset1.Source = SQL
Jul 19 '05 #5
MBS
Another thing that I am noticing is that whenever the querystring
contains the registered trademark symbol "®" that if I do a
response.write of the string, the symbol appears correctly but is
flaky when going against the access db. For example sometimes the
recordset is empty when in fact, it is not. However, if I cut and
paste this (below) and run it inside access, there are records! It is
as though some special characters are getting dropped from the asp
page to the database. What's up with this?

Here is a sample:
SELECT * from products where prodname=activent®
Jul 19 '05 #6

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

Similar topics

3
by: mark4asp | last post by:
Hello Guys, I find myself having to format a lot of subscript & superscript characters from text which is being HTMLed. This was originally OCRed but the OCRed work was not saved as HTML due to...
5
by: Ben Sharvy | last post by:
In order to do superscripts, for footnotes, I used the following class: ..fnote {vertical-align: super; font-size: smaller;} (It's always in an anchor, e.g. <a class="fnote" etc.>1</a> ...
8
by: dalei | last post by:
The following code does not work. Can anyone help with modifying it? <script type='text/javascript'> function super2 () { var theNum = prompt ('Please enter a number: ', ' ');...
3
by: Rani Ponmathi | last post by:
Please can I know how to display the formulae using superscript (Ex:- E = mc2 here 2 is superscript text) and subscript (H20 - here 2 is subscript text) in Label control of VB6 Thank You!
3
by: MLH | last post by:
How do I exercise more control over this? Quite honestly, I don't know how I did it. I seem to recall that I wrote the text outside of Access & later pasted it into a control. It was something...
0
samycbe
by: samycbe | last post by:
Hi, I have a value in sql database as 0c. but i want to display that for the user report in a flexgrid with (0c - 0 only) superscript and subscript. like that m3 also 3 should come in a...
8
by: Ben | last post by:
If you want to use both subscript and superscript *together*, how do you make them align horizontally? E.g., I want to have a^2_i (read in LaTeX), how do you make both '2' and 'i' align...
1
by: abhay160875 | last post by:
How can i use subscript and superscript by using VB of .net
1
by: siri11 | last post by:
hi everyone.. Please can anyone tell me how to display the formulae using superscript (Ex:- Kg/m2 here 2 is superscript text) and subscript (NO2 - here 2 is subscript text) in Label control in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.