Adding Child BOs Exception


Author
Message
Derrick Bell
Derrick Bell
StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)
Group: Forum Members
Posts: 33, Visits: 71

I'm adding a child BO that will be called similar to the childBO in your CRM example. Somewhere along the way after I added the child object to the form and configured my second child BO relationship by the primary key(case_sid) I get the following exception when adding a new record:

SyntaxErrorException

            Syntax error: Missing operand after 'case_sid' operator.

 

All of my fields are locked on the form until I either remove the childBO from my maintenance form or eliminate the relationship with the Parent BO. In the mean time I've added my third business object without error. The issue is probably some tweak of the object, but I cant figure it out. I thought the exception might be familar to you.

Derrick Bell

Replies
Derrick Bell
Derrick Bell
StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)
Group: Forum Members
Posts: 33, Visits: 71
Here is the stack trace:

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.Navigate(BusinessNavigationDirection Direction, Int32 AbsoluteIndex, Object[] PrimaryKeyValues, Boolean AttemptToCheckRules, Boolean IsRefill)

   at MicroFour.StrataFrame.Business.BusinessLayer.Add(Boolean CheckSecurity)

   at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Add(Boolean CheckSecurity)

   at MicroFour.StrataFrame.UI.Windows.Forms.DevEx.MaintenanceFormToolbar.cmdNew_ItemClick(Object sender, ItemClickEventArgs e)

   at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)

   at DevExpress.XtraBars.BarBaseButtonItem.OnClick(BarItemLink link)

   at DevExpress.XtraBars.BarItemLink.OnLinkClick()

   at DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)

   at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)

   at DevExpress.XtraBars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs)

   at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)

   at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)

   at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)

   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at DevExpress.XtraBars.Controls.DockedBarControl.WndProc(Message& msg)

   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)

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yep, happened while you were trying to set the filter on the child records... what are the primary and foreign key fields, and what is the value of the primary key in the parent record when the exception is thrown?
Derrick Bell
Derrick Bell
StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)
Group: Forum Members
Posts: 33, Visits: 71
I might have been trying to do too much at once. When I initially added the ChildBO, I configured the parent-child properties immediately. Is this okay? Or should I build solution first?

Second there might be issues with the underlying database changing keys, so I deleted the object and it's mapping. Dropped and rebuilt the database table and am in the process of reviewing.

Derrick


Derrick Bell
Derrick Bell
StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)
Group: Forum Members
Posts: 33, Visits: 71
There is no key yet because I'm adding a new reocrd.

Derrick

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
At the point when the exception is thrown, the new record will have already been added to the business object... I was just wondering if the primary key for the record was a negative number or if it was NULL.
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You said that the Driver1 business object gets filtered correctly... there was a bug in the FilterChildRecords() method that caused it to fail if the parent business object attempted to filter more than one child business object because the filter was not correctly reset after each iteration through the child business objects... I thought that you were the one that found the bug, but maybe not.  It was resolved last week, so it this might just be a bug that was resolved and you just need the latest version.
Derrick Bell
Derrick Bell
StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)
Group: Forum Members
Posts: 33, Visits: 71
That could be it. I'll Download the latest and let you know.

Derrick

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Keep me posted...
Derrick Bell
Derrick Bell
StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)
Group: Forum Members
Posts: 33, Visits: 71
That was it.. the error is gone now. On to new horizons.

Derrick

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Good, I'm glad that fixed it... I would have mentioned something earlier, but for some reason, I was thinking you were the one that found the bug and already had the fix for it.  Oh well Smile
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Derrick Bell - 19 Years Ago
StrataFrame Team - 19 Years Ago
Derrick Bell - 19 Years Ago
StrataFrame Team - 19 Years Ago
Derrick Bell - 19 Years Ago
                     There is no key yet because I'm adding a new reocrd. Derrick
Derrick Bell - 19 Years Ago
                         At the point when the exception is thrown, the new record will have...
StrataFrame Team - 19 Years Ago
                             You said that the Driver1 business object gets filtered correctly......
StrataFrame Team - 19 Years Ago
                                 That could be it. I'll Download the latest and let you know. Derrick
Derrick Bell - 19 Years Ago
                                     Keep me posted...
StrataFrame Team - 19 Years Ago
                                     That was it.. the error is gone now. On to new horizons. Derrick
Derrick Bell - 19 Years Ago
                                         Good, I'm glad that fixed it... I would have mentioned something...
StrataFrame Team - 19 Years Ago
Derrick Bell - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search