ok thanks alot for all who help me ,but now i have another problem i want to get this statement correct also
if (byNametextBox.Text != null && byBuildingtextBox.Text !=null && seTextBoxPublic1.Text == null)
{
da = new SqlDataAdapter("SELECT * FROM Students WHERE name='" + byNametextBox.Text +"and [buil-id]='"+byBuildingtextBox.Text+ "'", MyConn);
}
i want to select from the same table with two condition please