Print Page | Close Window

URLEncode and the ’

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=12187
Printed Date: 30 March 2026 at 11:47pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: URLEncode and the ’
Posted By: zMaestro
Subject: URLEncode and the ’
Date Posted: 15 October 2004 at 11:16am

Need Help please

Does the Server.URLEncode can't deal with the apostrophe '

I have a catalogue with some items having in its name an '
It gives error when trying to read it from database

please try clicking on any item with an ' in its name here:
http://www.american-balloons.com/ - http://www.american-balloons.com/

The Item name is Yes! I'm a girl,
I use this code while reading its name from database
<%=server.URLEncode(RSpecial("ItemE"))%>

it is translated to:
Yes%21+I%27m+a+Girl

but when read i get this error

Syntax error (missing operator) in query expression 'Show = 'y' AND  CategoryE = 'Microfoil Balloons' AND ItemE = 'Yes! I'm a Girl' ORDER BY ID DESC;'.

so, it is again back to the ' while getting read from the database and not %27

any help

n.b. i'm using Access Database




Replies:
Posted By: ljamal
Date Posted: 15 October 2004 at 2:06pm
Replace the apostrophe with two apostrophes in the SQL query

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net