Expand|Select|Wrap|Line Numbers
- //When cbxInvNum is changed, it will display all fields on dgDisplay datagrid from SaleReceipts Table where invoice number = to the selected invoice number
- string sql = "SELECT * WHERE InvoiceNumber = " + cbxInvNum.Text;
- SqlCommand cmd = new SqlCommand(sql, dbConnection);
- cmd.CommandType = CommandType.Text;
- SqlDataAdapter da = new SqlDataAdapter(cmd);
- DataTable dt = new DataTable();
- da.Fill(dt);
- dgDisplay.DataSource = dt;
The multi-part identifier "System.Data.DataViewManagerListItemTypeDescriptor " could not be bound.
It does catch the error but still displays the data on the datagrid, but I'd really like to know why this error occurs.