?
Solved

Replace ' with '' in string

Posted on 2016-09-21
2
Medium Priority
?
47 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 37

Accepted Solution

by:
Kimputer earned 2000 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
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…
Suggested Courses

864 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