find an replace a particular character with another in strin
I have a text file with a group of names.i have to read each one and store it to database.But error comes for names like D'Souza.the error in unclosed quotation mark after the character string ' ........pls help me to solve this bug
VulpesPosted Oct 29, 2013, 7:37 AM
name.Replace("'", "''")
In other words, you need to double the apostrophes.
If the name doesn't contain an apostrophe, the string.Replace method has no effect.