PrimaryKeyIsAutoIncremented On Save


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 getting the error below when I attempt to save from my form. The linkage field to my two new child BOs is the parent key and not the autoincrementing keys of the Child tables the BO is associated with.

ParentRelationship is the Parent PK to FK in Child.  

BusinessLayerException
 An error occurred while saving an the data to the server.
DataLayerSavingException
 Cannot create INSERT command because a business object with PrimaryKeyIsAutoIncremented = True must have exactly 1 primary key field.
Exception
 Cannot create INSERT command because a business object with PrimaryKeyIsAutoIncremented = True must have exactly 1 primary key field.

Source     : MicroFour StrataFrame Business

Stack Trace:
   at MicroFour.StrataFrame.Data.DataLayer.BuildInsertInfo(DataTable UpdatingTable, Boolean Transactional, String TransactionKey)
   at MicroFour.StrataFrame.Data.DataLayer.UpdateDataTableThread(Object ThreadParams)
   at MicroFour.StrataFrame.Data.DataLayer.SaveByForm(DataTable TableToSave, Boolean Transactional, String TransactionKey)
   at MicroFour.StrataFrame.Business.BusinessLayer.SaveByForm(Boolean Transactional, String TransactionKey)
   at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save(Boolean Transactional, String TransactionKey)
   at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save()
   at MicroFour.StrataFrame.UI.Windows.Forms.DevEx.MaintenanceFormToolbar.cmdSave_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)

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
Trent L. Taylor - 19 Years Ago
Derrick Bell - 19 Years Ago
Trent L. Taylor - 19 Years Ago
                     Here they are. Thanks!
Derrick Bell - 19 Years Ago
                         What's strange is that all the children have auto-incrementing primary...
Derrick Bell - 19 Years Ago
                             I can't tell which picture you're referring to because the images are...
StrataFrame Team - 19 Years Ago
                                 I'll try that
Derrick Bell - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search