I am having trouble with SELECT WHERE LIKE due to the use of @.
Using
string Mysql = "SELECT * FROM sytransactioncategory WHERE TransactionCategory LIKE '%' + @TransactionCategory + '%'";
Do not Work.
I found several interesting answers, like this but I did not not manage to adapt it to my case. Here is my current C# code:
string Mysql = "SELECT * FROM sytransactioncategory WHERE TransactionCategory LIKE @TransactionCategory";
MySqlDataAdapter adapter = new MySqlDataAdapter(Mysql,ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString);
adapter.SelectCommand.Parameters.AddWithValue("@TransactionCategory", e.Text);
Anyone could give me a track please?