Click here to Skip to main content
16,020,626 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi ALL,

I am trying too save a urls consisting \ into mysql using C#, "Unfortunately I can not!!! and I don't want to use regular expressions and change the URL as it will not work anymore!!!

Please give your ideas..What should I do?

Regards
Posted
Comments
Christian Graus 17-Aug-10 15:43pm    
Reason for my vote of 1
OP asked the same question twice.
Toli Cuturicu 18-Aug-10 6:59am    
Reason for my vote of 1
duplicate question

1 solution

Use escape sequence '\', i.e. use two backslashes and one will be entered.
Or
you can call mysql_real_escape_string to insert escape characters as necessary.
 
Share this answer
 

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