I am new to C# and am creating a test app to populate a combo-box from a table within an Access database. I want to be able to set this information on the fly. As a tester, I have created a new form, added a single combo-box called "TBCallOutcome", and added the code.
However, it seems to populate the drop-down with "System.Data.DataRowView" in every row.
Any ideas - thank you?
private void Form1_Load(object sender, EventArgs e)
{
string query = "SELECT [Call outcome] FROM [DD Call Outcomes] WHERE ((([Show on list])=True)) ORDER BY [Sort order]";
OleDbDataAdapter dAdapter = new OleDbDataAdapter(query, @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source='N:\\Test\\Dropdowns.mdb';User Id=admin; Password=;");
DataTable source = new DataTable();
dAdapter.Fill(source);
TBCallOutcome.DataSource = source;
}