Strangeness with BO and columns not defined in BO


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (12K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
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!
Replies
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (12K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
How would I do #2? I've never used the SF source like this. Reference the sf project?
Trent Taylor
Trent Taylor
StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)StrataFrame Developer (38K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
You can do this several ways.  You can open the source, select the UI project, right-click and go into Properties.  Oonce in there, go to the debug tab and set a program to execute your application EXE in the program to execute.  Make sure that the UI project is select, and hit the play button.

Second, be sure that the SF source is built in debug.  Then be sure that your application is built in debug.  Just run your application from the EXE (not through Visual Studio).  Then open the SF source and add your break point.  Next, click Debug->Attach to Process and select your EXE process that is running.  Thhe break point should then be hit once reached.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search