Thanks Ivan, that fixed the problem but, as you may imagine, another has surfaced. When I try to populate my BO with data with the code:
Private Sub boHID_ParentFormLoading() Handles Me.ParentFormLoadingMe.FillDataTable("SELECT tblHIDHides.* FROM tblHIDHides")End SubI get an error on the FillDataTable line: "DataLayerException unhandled" along with the message: "An error occurred while creating a new DataLayer for the business object."
The Inner Exception tells me: "{"The DataSourceKey [] is not defined."}". In checking properties I see there is a DataSourceKey but, as I understand it from the Help Docs, when there is only one data source this value should be blank and mine is. I've copied and pasted the select string into QA in SQL 2005 and it executes ok.
My BO is mapped to a database table and I presume this is ok because my Dev Express grid has now been populated with all the columns in the table (after your previous advice).
Hope you can help. TIA Peter
-----------------------------------------------------------
The exception details are:
MicroFour.StrataFrame.Data.DataLayerException was unhandled
Message="An error occurred while creating a new DataLayer for the business object."
Source="MicroFour StrataFrame Business"
StackTrace:
at MicroFour.StrataFrame.Business.BusinessLayer.get__DataLayer()
at MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(String SelectStatement)
at SF_Test06.boHID.boHID_ParentFormLoading() in C:\Documents and Settings\pmj\My Documents\Visual Studio 2005\Projects\SF_Test06\SF_Test06\boHID.vb:line 93
at MicroFour.StrataFrame.Business.BusinessLayer.raise_ParentFormLoading()
at MicroFour.StrataFrame.Business.BusinessLayer.OnParentFormLoading()
at MicroFour.StrataFrame.Business.BusinessLayer.RaiseParentFormLoadingEvent()
at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.InitializeFormLoadObjects()
at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at SF_Test06.frmHID.Main() in C:\Documents and Settings\pmj\My Documents\Visual Studio 2005\Projects\SF_Test06\SF_Test06\frmHID.Designer.vb:line 2
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()