Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
I have a form with three BOs on it. One parent and two children. In the FormLoad event handler I have a call to one of the parent BO's fill methods:
me.ProjectProcessBO1.FillByProject(projectID)
In the fill method, I'm (for now) just using a sql statement:
dim sql as string
sql = "Select * From tblProjectProcess Where ProjectID = " & projectID
return me.FillDataTable(sql)
If I set the parent BO on both child objects, I get an error on the FillDataTable call (see below). If only one parent is set, then it works (either one, just so long as it is only one). ProjectProcessID is the PK for the table (and the FK for the two child tables). Note, I'm not calling anything with the children (in my code). This is happening when the parent loads.
Any ideas as to what is occurring?
Here is the error text:
SyntaxErrorException
Syntax error: Missing operand after 'ProjectProcessID' operator.
Source : System.Data
Stack Trace:
at System.Data.ExpressionParser.Parse()
at System.Data.DataExpression..ctor(DataTable table, String expression, Type type)
at System.Data.DataView.set_RowFilter(String value)
at MicroFour.StrataFrame.Business.BusinessLayer.set_Filter(String value)
at MicroFour.StrataFrame.Business.BusinessLayer.FilterChildRecords(BusinessLayer ChildBusinessObject)
at MicroFour.StrataFrame.Business.BusinessLayer.FilterChildRecords()
at MicroFour.StrataFrame.Business.BusinessLayer.Navigate(BusinessNavigationDirection Direction, Int32 AbsoluteIndex, Object[] PrimaryKeyValues, Boolean AttemptToCheckRules, Boolean IsRefill)
at MicroFour.StrataFrame.Business.BusinessLayer.OnCurrentDataTableRefilled()
at MicroFour.StrataFrame.Business.BusinessLayer.ChangeCurrentDataTable(DataTable NewTable, Boolean AcceptChanges, Boolean IsSharedTable)
at MicroFour.StrataFrame.Business.BusinessLayer.ChangeCurrentDataTable(DataTable NewTable, Boolean AcceptChanges)
at MicroFour.StrataFrame.Business.BusinessLayer.ChangeCurrentDataTable(DataTable NewTable)
at MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(String SelectStatement)
at RAMS_MITA_2.ProjectProcessBO.FillByProject(Int32 projectID) in C:\Projects\MyProject\ProjectProcessBO.vb:line 80
at RAMS_MITA_2.ProjectProcessForm.ProjectProcess_Load(Object sender, EventArgs e) in C:\Projects\MyProject\ProjectProcessForm.vb:line 111
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
|