this is a dropdown
and with one text box for date this query is properly work my working query is:=
select EmplID='" + TextBox1.SelectedValue + "', date='" + TextBox2.Text & "',RESULT = CASE WHEN exists(select * from AtdRecord where RecDate ='" + TextBox2.Text & "' and EmplID='" + TextBox1.SelectedValue + "') THEN ('P')ELSE ('A ' ) END,ResultType= CASE WHEN exists (select * from AtdRecLeave where StDate = '" + TextBox2.Text & "' and EmplID='" + TextBox1.SelectedValue + "') THEN (SELECT ResultType FROM AtdRecLeave WHERE EmplID='" + TextBox1.SelectedValue + "' and stDate = '" + TextBox2.Text & "') else ('-') END
but when we display data between two dates using another textbox in this query it gives me error