Hey everyone,
I currently nearly finished a simple application, but my query doesnt work. I have a combobox and a textbox. By selecting a column name from the combobox, I want to be able to search in the textbox within that column. Anyone that can fix this query? I've been trying alot but havent had any succes yet.
SqlCommand command = new SqlCommand("SELECT * FROM dbo.Kwartaal " +
"WHERE '" + searchField + "' LIKE '% " + txtSearch.Text + "%' ", con);
Edit: searchField is my string that gets filled by selecting the column. txtSearch is the textbox obviously.