Solved

Replace ' with '' in string

Posted on 2016-09-21
2
28 Views
Last Modified: 2016-09-21
Hello,
I am passing the values to sql which have apostrophe in it.
There are quite a few stored procedures and the lot of parameters is there a better way of chaging the value
from ' to '' in a string or value1.Replace("XX", "Areo") is the only way.

Cheers
0
Comment
Question by:RIAS
2 Comments
 
LVL 35

Accepted Solution

by:
Kimputer earned 500 total points
ID: 41808568
Strings.Replace("'1'", """1""")

Open in new window

means in sql it's
'1'
to
"1"
0
 

Author Closing Comment

by:RIAS
ID: 41808587
Cheers
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This video discusses moving either the default database or any database to a new volume.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now