What is Error-The multi-part identifier "System.Data.DataRowView" could not be bound. in code bellow-
what is error
Error-The multi-part identifier "System.Data.DataRowView" could not be bound.
in code bellow-
con = new SqlConnection(@"Data Source=COMP12\SQLEXPRESS;Initial Catalog=TNTDB;Integrated Security=True");
con.Open();
string str = "select Material_Description from InwardRegister where PO=" + txt_po_no.SelectedValue + "";
SqlCommand cmd = new SqlCommand(str, con);
dr = cmd.ExecuteReader();
while (dr.Read())
{
cmb_mat_name.Items.Add(dr["Material_Description"]);
}
dr.Close();
cmb_mat_name.Text = "-Select-";
con.Close();