Does anybody have any good .NET functions they can share to escape necessary MySQL query characters?
Thanks!
Does anybody have any good .NET functions they can share to escape necessary MySQL query characters?
Thanks!
Shouldn't you be using the MySQL Connector/NET? If you need to do something like parameterized queries, then it should provide "safe" and correct ways to do it, e.g. in this example.
Could you give an example of the necessary characters? Without a context...you could try using "@" to give a literal string.
string query= @"select * from table"
Otherwise there is String.Replace()
.