Click here to Skip to main content
15,881,730 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,

I want to remove the ' character from the string. It is giving error when replacing the this character from another.
Posted
Comments
Kschuler 21-Jun-11 14:04pm    
What kind of SQL statement are you doing? Are you doing it in code? If you're writing a program you should look at using parmameters instead of directly inserting data, then you won't have to worry about things like the ' character.

1 solution

You need to replace it BEFORE it hits SQL, so in whatever language you're using. C# has a Replace method on the string class.
 
Share this answer
 
Comments
jagadeesh123qqq 21-Jun-11 6:14am    
Thanks for your replay but I have imported from excel sheet.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900