Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace a double quote with a single quote in a string. 1

Status
Not open for further replies.

steve1rm

Programmer
Aug 26, 2006
255
GB
Hello,

I have some strings which I want to replace them with single quotes so that I can use them as arguments that are passed to a sql query.

Example, string variable Name:
"Peter John"

Should be replaced with single quotes
'Peter John'

so name should contain only 'Peter John'

Is there any possible way to do this.

Many thanks,

Steve
 
String.Replace but use "\"" and "'" as your search and replace strings.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top