Characters to Replace in QueryString

F

Fawke101

Hi there,

I have an ASP/SQL application that uses data from a querystring to run an
SQL SELECT statement.
Some of the data in the querystring could contain apostrophies, so i run the
following Replace statement:

***
strArea = Replace(Session("lstArea"),"'","''")
***

This works and successfully pulls the records down from the database when
using a SELECT statement and the strArea variable.

I am having some trouble getting records when there are commas and &'s in
the querystring. What characters do not go into a SELECT statement (like
apostrophies)?????
Do i have to issue more of these Replace statements to get around other
invalid syntax characters for SELECT statements????

Thanks


--
Thanks in advance

Fawke

Please remove ANTI and SPAM
from my email address before emailing me.

www.bradflack.com
 
F

Fawke101

Ok, Server.URLEncode seems to be doing the trick now.....

Thanks anyway

--
Thanks in advance

Fawke

Please remove ANTI and SPAM
from my email address before emailing me.

www.bradflack.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top