Problem in searching with multiple textboxes over datagridview
-
I have a datagridview in windows form application m also have 4 textboxes now m wanna to perform search in dataase using textboxes and thn show the result data into datagridview so m trying select * from Medicine where (Medicine_Name is null or Medicine_Name like '%" + Medicine_Name.Text + "%') or (Medicine_Dosage is null or Medicine_Dosage like '%" + Med_Dosage.Text + "%') or (Medicine_Symptons is null or Medicine_Symptons like '%" + Med_Symtoms.Text + "%') and Med_SubCat=(select Med_SubCat from Medicine_subcatagory where Med_Sub='" + this.Text + "') tht query but i doesnt find a correct answer can anyone tells me solution of it m jst wanna tht whether i put some text in 1 and 2 textbox and thn whenever i click on search datagridview will show me the common data only plzzz help me in it