i have one table name is room in this roomno is one column and in front-end windows form i have my design when i select roomnumber using combobox it start compare weather the roomnumber is already reserved or not
please any one provide the code

Ranjit PowarRank #553 · 4.4K reputationPosted Dec 21, 2015, 4:44 AM EST
SqlDataAdapter da= new SqlDataAdapter("select status from room where roomno='"+comboBox1.Text+"'",con);
DataTable dt=new DataTable();
da.Fill(dt);
string status=DT.Rows[0][0].ToString();
chennakrishnareddy bijivemula28 reputationPosted Dec 21, 2015, 7:17 PM EST
Ranjit PowarRank #553 · 4.4K reputationPosted Dec 21, 2015, 7:38 PM EST
chennakrishnareddy bijivemula28 reputationPosted Dec 21, 2015, 7:53 PM EST
Ranjit PowarRank #553 · 4.4K reputationPosted Dec 21, 2015, 8:14 PM EST
DataTable dt=new DataTable();
da.Fill(dt);
if(dt.Rows.Count>0)