How do i call the entity that is mapped on a view in the database?
ResultsetFields fields2 = new ResultsetFields(2);
fields[0] = VwLocationFields.Location;
fields[1] = VwLocationFields.ID;
IDataReader reader2 = Adapter.FetchDataReader(fields2, null, CommandBehavior.CloseConnection, 0, true);
System.Data.DataTable comboCollection = new DataTable();
comboCollection.Load(reader2);
reader2.Close();
ucboSource.DataSource = comboCollection;
ucboSource.DisplayMember = VwLocationFields.Location.Name;
ucboSource.ValueMember = VwLocationFields.ID.Name;
This throws an exception. I think the exception was something about an id that's already added. I have changed the code, so i can't throw the exact exception at the moment.
Any help would be appreciated.