like this...
string selecdate;
string query="select * from Leave where Codeday ='"+selecdate+"' and faculty_Name ='"+combobox1.slectedtext+"' ";
con.open()
SqlCommand cmd=new sqlcommand(con,query)
sqlDataReader dr=cmd.executeReader();
if(dr.read())
{
messageBox.show("this faculty not available on this day");
}
else
{
messageBox.show("This faculty available on this day");
}
con.close();