System.ArgumentException was unhandled by user code Message="Column 'ID' does not belong to table tblCertHolders." Source="System.Data" StackTrace: at System.Data.DataRow.GetDataColumn(String columnName) at System.Data.DataRow.get_Item(String columnName) at FMLCertHolderConversion.boCertHolders.get_ID() in D:\FMLCertHolderConversion\FMLCertHolderConversion\boCertHolders.Designer.vb:line 239 at FMLCertHolderConversion.boCertHolders.Field_ID_Descriptor.GetValue(Object component) in D:\FMLCertHolderConversion\FMLCertHolderConversion\boCertHolders.Designer.vb:line 735 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.InitializeObject() at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.InitializeFormLoadObjects() at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.BaseForm_Load(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Here is the code that causes the error.
<Browsable(
Is there any data in the business object when you reference this field? If there is not any data in the business object you can get this error message. If you call NewRow() before attempting to place data in the field do you get this same error?
The framework is trying to populate a ListView that you've dropped onto your form. You have the PopulationDataSourceSettings configured to display the ID column in one of the ListView's columns. The ID column has not been pulled from SQL Server, so it appears that whatever query you're executing within the PopulationDataSourceSettings, is not executing an SQL query that pulls in the ID column. Check the "Method to Execute" and make sure that it fills the business object with a select statement that includes column "ID".