?
Solved

Allow punctuation in a query string

Posted on 2004-11-15
2
Medium Priority
?
283 Views
Last Modified: 2008-07-03
I want to allow the use of an apostrophe in my query string as follows:

resultCriteria = Request.Form(Item)
resultCriteria = Replace(resultCriteria,"'","'''")    

sqlString = "EXEC spSearchMerchants '" & resultCriteria & "'"
0
Comment
Question by:RonNeiger
2 Comments
 
LVL 8

Accepted Solution

by:
hendridm earned 500 total points
ID: 12585671
Erm, what's the question?  Is it not working for you?  Looks like you have an extra apostrophe in line 2 (should be "''" instead of "'''").

resultCriteria = Replace(resultCriteria,"'","''")
0
 

Author Comment

by:RonNeiger
ID: 12586396
Thank you that worked fine
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Screencast - Getting to Know the Pipeline
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question