I'm filling a BO using the FillDataTable method. The query that I'm using is actually hitting a view and of 9 columns I'm returning, only three have the same name as strongly typed properties in the BO.
The weirdness is that for certain column names, I get an exception:
IndexOutOfRangeException
The given item name could not be evaluated. The item 'VendorID' does not exist on the business object.
Source : MicroFour StrataFrame Business
Stack Trace:
at MicroFour.StrataFrame.Business.BusinessLayer.GetDescriptor(String FieldName)
at MicroFour.StrataFrame.Business.BusinessLayer.get_Item(String FieldName)
at MicroFour.StrataFrame.UI.Windows.Forms.ListView.CreateListViewItem(BusinessLayer BusinessObject)
at MicroFour.StrataFrame.UI.Windows.Forms.ListView.PopulateListView(Object[] Parameters)
at MicroFour.StrataFrame.UI.Windows.Forms.ListView.Requery(Object[] Parameters)
at FOXSystems.RAMS.UI.SearchEngine.SearchUIManager.Search(Object sender, EventArgs e) in E:\FoxSystems\RAMS\trunk\RAMS.NET\RamsUI\SearchEngine\SearchUIManager.vb:line 1430
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
....etc.
As you can see, this is occurring when a listview is attempting to load data from the BO and attempts to get the descriptor. Now, there will be no descriptor for VendorID, because it isn't one of the properties in the BO.
What is weird, as I mentioned, is that there are several other columns (more than half) that also don't have descriptors in the BO, but they are working fine. I would understand if none of them worked, but only some of them are failing (so far, those starting with "Vendor" have failed, though I doubt that that word is causing the problem).
I'm sure I'm doing something wrong, somehow, because I'm using this sort of thing all over the place to fill listview, combos and listboxes...and it works with other columns. What could I be missing here?
Thanks!