sql = "SELECT PATIENTS_FName + ' ' + PATIENTS_LName AS FullName FROM PATIENTS"; OleDbCommand dbCom = new OleDbCommand(sql, dbConn); dbCom.ExecuteNonQuery(); DataSet names = new DataSet(); OleDbDataAdapter dbAda = new OleDbDataAdapter(dbCom); dbAda.Fill(names, "ImportTable"); comboBox1.DataSource = names.DefaultViewManager; comboBox1.ValueMember = "FullName"; comboBox1.DisplayMember = "FullName";
I get an error pointing to this line:
comboBox1.ValueMember = "FullName";
Saying ArgumentException was Unhandled. Cannot Bind to new display member. Parameter name: newDisplayMember.
Any help would be appreciated. I am doing this for fun and am completely stumped by this problem.